Skip to content

Commit

Permalink
chore: migrate to changesets
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin authored Oct 14, 2023
1 parent 65c8b57 commit a243ba3
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,35 @@ on:

jobs:
release:
name: Release
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout Repo
uses: actions/checkout@v3
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- uses: actions/setup-node@v2
with:
node-version: '12.x'
- name: Setup Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: npm

- run: npm i
- name: Install Dependencies
run: npm install

- run: npm start build
- name: Build
run: npm start build

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release@15
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: pnpm release
commit: 'chore: release prettier-eslint'
title: 'chore: release prettier-eslint'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit a243ba3

Please sign in to comment.