fix(use-ask): fix package version #7
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
# Originally inspired by Cloudflare Wrangler | |
# https://github.com/cloudflare/wrangler2/blob/main/.github/workflows/release.yml | |
name: Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
if: ${{ github.repository_owner == 'junwen-k' }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
strategy: | |
matrix: | |
node-version: [20.13.1] | |
pnpm-version: [9.1.1] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install pnpm ${{ matrix.pnpm-version }} | |
uses: pnpm/action-setup@v4 | |
with: | |
version: ${{ matrix.pnpm-version }} | |
- name: Install Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build | |
run: pnpm build | |
- name: Create Version PR or Publish to NPM | |
id: changesets | |
uses: changesets/[email protected] | |
with: | |
commit: 'chore(release): version packages' | |
title: 'chore(release): version packages' | |
version: node .github/changeset-version.js | |
publish: pnpm publish-packages | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} | |
NODE_ENV: 'production' |