Merge pull request #341 from pimlicolabs/changeset-release/main #414
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 (Canary) | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
canary: | |
name: Release canary | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: ./.github/actions/install-dependencies | |
- name: Setup .npmrc file | |
uses: actions/setup-node@v4 | |
with: | |
registry-url: 'https://registry.npmjs.org' | |
- name: Set permissionless version | |
run: | | |
jq --arg prop "workspaces" 'del(.[$prop])' package.json > package.tmp.json && rm package.json && cp package.tmp.json package.json && rm package.tmp.json | |
cd packages/permissionless | |
npm --no-git-tag-version version 0.0.0 | |
npm --no-git-tag-version version $(npm pkg get version | sed 's/"//g')-$(git branch --show-current | tr -cs '[:alnum:]-' '-' | tr '[:upper:]' '[:lower:]' | sed 's/-$//').$(date +'%Y%m%dT%H%M%S') | |
- name: Set permissionless/wagmi version | |
run: | | |
cd packages/wagmi | |
npm --no-git-tag-version version 0.0.0 | |
npm --no-git-tag-version version $(npm pkg get version | sed 's/"//g')-$(git branch --show-current | tr -cs '[:alnum:]-' '-' | tr '[:upper:]' '[:lower:]' | sed 's/-$//').$(date +'%Y%m%dT%H%M%S') | |
- name: Build | |
run: bun run build | |
- name: Publish permissionless to npm | |
run: cd packages/permissionless && npm publish --tag $(git branch --show-current | tr -cs '[:alnum:]-' '-' | tr '[:upper:]' '[:lower:]' | sed 's/-$//') | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_ORG_PERMISSIONLESS_TOKEN }} | |
- name: Publish permissionless/wagmi to npm | |
run: cd packages/wagmi && npm publish --tag $(git branch --show-current | tr -cs '[:alnum:]-' '-' | tr '[:upper:]' '[:lower:]' | sed 's/-$//') | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_ORG_PERMISSIONLESS_TOKEN }} |