v18.3.0 #69
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow releases the `matrix-sdk-crypto-wasm` project. | |
| # | |
| # It is triggered when a new tag appears that matches | |
| # `v[0-9]+.*`. This workflow builds the package | |
| # for the bindings, runs its tests to ensure everything is still | |
| # correct, and publishes the package on NPM and on a newly created | |
| # Github release. | |
| name: Release `crypto-js` | |
| env: | |
| CARGO_TERM_COLOR: always | |
| on: | |
| push: | |
| tags: | |
| - v[0-9]+.* | |
| jobs: | |
| publish-matrix-sdk-crypto-wasm: | |
| name: Publish 🕸 [m]-crypto-wasm | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # Allow requesting an OIDC JWT, which is required to publish to npm | |
| contents: read | |
| steps: | |
| - name: Checkout the repo | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust | |
| run: | | |
| rustup install stable | |
| rustup default stable | |
| rustup target add wasm32-unknown-unknown | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| with: | |
| # Explicitly disable the store cache to prevent pollution from other workflows. | |
| cache: false | |
| # Keep this in sync with: | |
| # .github/workflows/ci.yml | |
| # .github/workflows/latest-matrix-sdk-crypto.yml | |
| - name: Install Node.js | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: 24.0 | |
| # Explicitly disable caching, see above. | |
| cache: "" | |
| package-manager-cache: false | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm build | |
| - name: Run tests | |
| run: pnpm test | |
| - name: Publish to npmjs | |
| run: npm publish --provenance --ignore-scripts | |
| github-release: | |
| name: Create the Github release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout the repo | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Create the Github release | |
| run: gh release create "$GITHUB_REF_NAME" --draft | |
| env: | |
| GH_TOKEN: ${{ github.token }} |