feat: release react component (#36) #276
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: Release | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
id-token: write | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: macos-latest | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
token: ${{ secrets.GH_SECRET }} | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
registry-url: 'https://registry.npmjs.org/' | |
scope: '@trust0' | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Install wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Configure npm authentication | |
run: | | |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ./.npmrc | |
echo "@trust0:registry=https://registry.npmjs.org/" >> ./.npmrc | |
env: | |
NPM_TOKEN: ${{ env.NPM_TOKEN }} | |
- name: Run semantic-release | |
env: | |
NPM_TOKEN: ${{ env.NPM_TOKEN }} | |
GH_TOKEN: ${{ secrets.GH_SECRET }} | |
run: | | |
npm install | |
npm run build | |
npm run docs | |
npx multi-semantic-release |