Skip to content

ci: use github token for git actions #4

ci: use github token for git actions

ci: use github token for git actions #4

Workflow file for this run

# cSpell:ignore preid
name: Publish
on:
push:
branches:
- main
- release
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: read
packages: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- 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
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# 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: read
packages: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- 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
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}