Release production - main #114
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: Release production | |
run-name: Release production - ${{ github.ref_name }} | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.P_GITHUB_TOKEN }} | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
cache-dependency-path: 'pnpm-lock.yaml' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Setup npm token | |
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile --ignore-scripts | |
- name: Create Release Pull Request & Publish to npm | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
publish: pnpm run release | |
commit: "chore: release packages" | |
title: "chore: release packages production" | |
env: | |
GITHUB_TOKEN: ${{ secrets.P_GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |