Skip to content

chore: release 3.0.2 (#418) #49

chore: release 3.0.2 (#418)

chore: release 3.0.2 (#418) #49

Workflow file for this run

name: Release
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
env:
SCCACHE_GHA_ENABLED: 'true'
RUSTC_WRAPPER: 'sccache'
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/setup-pnpm
- uses: ./.github/actions/setup-dfx
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
# Triggers installation of the Rust toolchain
# Must be done before wasm-pack is installed
- name: Cargo metadata
run: cargo metadata --format-version 1
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Setup Commitizen
run: pip install commitizen==2.42.1
- name: Generate canister declarations
run: dfx generate
- name: Build NPM packages
run: pnpm build
- name: Generate release notes
run: cz changelog ${{ github.ref_name }} --file-name RELEASE_NOTES.md
- name: Release ic-representation-independent-hash Cargo crate
run: cargo publish -p ic-representation-independent-hash --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
- name: Release ic-certification Cargo crate
run: cargo publish -p ic-certification --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
# `ic-certification-testing` cannot be published since it relies on unpublished crates
# from the `ic` repository. Namely:
# - ic-types
# - ic-crypto-tree-hash
# - ic-crypto-internal-threshold-sig-bls12381
# - ic-crypto-internal-seed
# - ic-crypto-internal-types
#
# - name: Release ic-certification-testing Cargo crate
# run: cargo publish -p ic-certification-testing --token ${CRATES_TOKEN}
# env:
# CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
- name: Release ic-http-certification Cargo crate
run: cargo publish -p ic-http-certification --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
- name: Pack @dfinity/certification-testing NPM package
working-directory: packages/ic-certification-testing-wasm
run: npm pack --pack-destination ../../
- name: Release @dfinity/certification-testing NPM package
working-directory: packages/ic-certification-testing-wasm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Release ic-cbor Cargo crate
run: cargo publish -p ic-cbor --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
- name: Release ic-certificate-verification Cargo crate
run: cargo publish -p ic-certificate-verification --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
- name: Pack @dfinity/certificate-verification NPM package
working-directory: packages/certificate-verification-js
run: npm pack --pack-destination ../../
- name: Release @dfinity/certificate-verification NPM package
working-directory: packages/certificate-verification-js
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Release ic-response-verification Cargo crate
run: cargo publish -p ic-response-verification --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
- name: Pack @dfinity/response-verification NPM package
working-directory: packages/ic-response-verification-wasm
run: npm pack --pack-destination ../../
- name: Release @dfinity/response-verification NPM package
working-directory: packages/ic-response-verification-wasm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Release ic-asset-certification Cargo crate
run: cargo publish -p ic-asset-certification --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
- name: Create Github release
uses: ncipollo/release-action@v1
with:
artifacts: >
target/package/ic-certification-${{ github.ref_name }}.crate,
target/package/ic-http-certification-${{ github.ref_name }}.crate,
target/package/ic-representation-independent-hash-${{ github.ref_name }}.crate,
target/package/ic-cbor-${{ github.ref_name }}.crate,
target/package/ic-certificate-verification-${{ github.ref_name }}.crate,
target/package/ic-response-verification-${{ github.ref_name }}.crate,
dfinity-certification-testing-${{ github.ref_name }}.tgz,
dfinity-certificate-verification-${{ github.ref_name }}.tgz,
dfinity-response-verification-${{ github.ref_name }}.tgz
bodyFile: 'RELEASE_NOTES.md'
tag: '${{ github.ref_name }}'
commit: 'main'