chore: ci: specify full ref mapping #144
Workflow file for this run
This file contains 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
name: publish node packages | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.ref }}" | |
on: | |
push: | |
tags: | |
- "**" | |
env: | |
CARGO_INCREMENTAL: 0 | |
CARGO_NET_RETRY: 10 | |
RUSTUP_MAX_RETRIES: 10 | |
CARGO_TERM_COLOR: always | |
CARGO_NET_GIT_FETCH_WITH_CLI: true | |
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse | |
jobs: | |
publish-wasm: | |
if: github.repository == 'wireapp/core-crypto' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: force-fetch the tag to work around actions/checkout#290 | |
run: git fetch -f origin ${{ github.ref }}:${{ github.ref }} | |
- name: ensure the tag is signed | |
run: git cat-file tag ${{ github.ref_name }} | grep -q -- '-----BEGIN PGP SIGNATURE-----' | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
target: wasm32-unknown-unknown | |
- uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: install wasm-pack | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: wasm-pack | |
- uses: davidB/rust-cargo-make@v1 | |
- name: build wasm | |
run: | | |
cd crypto-ffi | |
cargo make wasm | |
cd bindings/js | |
bun run build | |
- name: publishes package to npm | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
access: public | |
package: "crypto-ffi/bindings/js/package.json" |