Skip to content

fix: release workflow #28

fix: release workflow

fix: release workflow #28

Workflow file for this run

name: Release
on:
push:
branches:
- main
workflow_dispatch:
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
verify:
name: Verify
uses: ./.github/workflows/verify.yml
release:
name: Release
needs: verify
permissions:
contents: write
id-token: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install dependencies
uses: ./.github/actions/install-deps
- name: 🏗 Setup Node
uses: actions/setup-node@v3
with:
registry-url: 'https://npm.pkg.github.com'
- name: Create Release Pull Request
uses: changesets/action@v1
with:
publish: pnpm release
createGithubReleases: ${{ github.ref == 'refs/heads/main' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish prerelease
if: steps.changesets.outputs.published != 'true'
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm config set "//registry.npmjs.org/:_authToken" "$NODE_AUTH_TOKEN"
git reset --hard origin/main
pnpm clean
pnpm changeset version --no-git-tag --snapshot canary
pnpm changeset publish --no-git-tag --snapshot canary --tag canary