v1.7.2-next.1 #8
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
# cSpell:ignore preid | |
name: Publish | |
on: | |
push: | |
branches: | |
- main | |
- release | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
# On changes to main, publish to the "next" dist tag | |
publish-next: | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ssh-key: ${{ secrets.SSH_KEY }} | |
- name: Prepare ✅ | |
uses: ./.github/actions/prepare | |
- name: Build 🔧 | |
run: npm run build | |
- name: Publish 🚀 | |
run: npx lerna publish --conventional-commits --create-release github --conventional-prerelease --preid next --dist-tag next --yes | |
# On changes to the release branch, publish to the "latest" dist tag | |
publish: | |
if: github.ref == 'refs/heads/release' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ssh-key: ${{ secrets.SSH_KEY }} | |
- name: Prepare ✅ | |
uses: ./.github/actions/prepare | |
- name: Build 🔧 | |
run: npm run build | |
- name: Publish 🚀 | |
run: npx lerna publish --conventional-commits --create-release github --conventional-graduate --yes |