Skip to content

Commit

Permalink
improve versioning and publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
nikgraf committed Jan 30, 2024
1 parent 059dede commit b22173c
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 7 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: workflow_dispatch
concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
version:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
Expand All @@ -25,7 +25,32 @@ jobs:
id: changesets
uses: changesets/action@v1
with:
publish: pnpm publish
version: pnpm changeset-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install wasm-bindgen-cli
run: cargo install wasm-bindgen-cli
- name: install wasm-unknown-unknown target
run: rustup target add wasm32-unknown-unknown
- uses: pnpm/action-setup@v2
with:
version: 8
- name: install dependencies
run: pnpm install
- name: install dependencies
run: pnpm install
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
version: pnpm changeset-version
publish: pnpm changeset-publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
10 changes: 6 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@ cd examples/client-simple-webpack
pnpm test:e2e
```

## Versioning

Is managed via Changesets. You can bump a version running the `version` action here: https://github.com/serenity-kit/opaque/actions/workflows/release.yml

## Publish

To publish the packages (opaque and opaque-p256) you can run
Is managed via the Github CI

```sh
pnpm publish
```
You can publish running the `publish` action here: https://github.com/serenity-kit/opaque/actions/workflows/release.yml
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"test:p256": "cross-env OPAQUE_BUILD=p256 jest",
"test:ristretto": "jest",
"test": "pnpm test:p256 && pnpm test:ristretto",
"publish": "pnpm build && pnpm changeset publish",
"changeset-version": "pnpm changeset version",
"changeset-publish": "pnpm build && pnpm changeset publish",
"typecheck": "tsc --noEmit && pnpm typecheck:fullstack-simple-nextjs && pnpm typecheck:fullstack-e2e-encrypted-locker-nextjs",
"typecheck:fullstack-simple-nextjs": "cd examples/fullstack-simple-nextjs && tsc --noEmit",
"typecheck:fullstack-e2e-encrypted-locker-nextjs": "cd examples/fullstack-e2e-encrypted-locker-nextjs && tsc --noEmit"
Expand Down

0 comments on commit b22173c

Please sign in to comment.