Merge pull request #164 from base-org/fix-release-workflow #6
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: Version π | |
on: | |
push: | |
branches: | |
- main | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
version: | |
name: Release | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
contents: write | |
pull-requests: write | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: "Setup" | |
uses: ./.github/actions/setup | |
- name: Build | |
shell: bash | |
run: pnpm build | |
- name: Set deployment token | |
run: npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}" | |
# https://github.com/changesets/action#with-publishing | |
- name: Handle Release Pull Request or Publish to npm | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
title: "chore: version packages π" | |
commit: "chore: version packages π" | |
publish: pnpm release:publish | |
version: pnpm release:version | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |