Publish Stable #1
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: Publish Stable | |
on: | |
workflow_dispatch: | |
# Wait for the workflow to finish before starting a new one | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
release-stable: | |
# Only allow on master branch | |
if: ${{ github.ref == 'refs/heads/master' }} | |
runs-on: ubuntu-latest | |
# More info: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings | |
permissions: | |
contents: write | |
pull-requests: write | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: master | |
fetch-depth: 0 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8.6.10 | |
- name: Install node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.16.0 | |
registry-url: https://registry.npmjs.org/ | |
cache: 'pnpm' | |
- name: Git config | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Set deployment token | |
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Publish To NPM | |
run: bash scripts/changesets/publish-stable.sh | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} |