generated from napi-rs/package-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(release): fix changesets release ci (#6)
* ci(release): fix changesets release ci * ci(test): remove publish in test * ci(release): fix permission * ci(test): remove on pull request * ci(test): set to workflow call only * ci(release): add needs option * ci(test): remove cancel in progress * ci(test): remove concurrency option * ci(release): try upgrade permission * ci: reset workflow `on` option * ci: set up concurrency * ci(release): add checkout name
- Loading branch information
Showing
3 changed files
with
57 additions
and
42 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: "release ${{ github.workflow }}-${{ github.ref }}" | ||
|
||
permissions: write-all | ||
|
||
jobs: | ||
build-and-test: | ||
name: Build and Test | ||
uses: ./.github/workflows/test.yml | ||
|
||
release: | ||
name: Release | ||
needs: [build-and-test] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: yarn | ||
- name: Install dependencies | ||
run: yarn install | ||
- name: Download all artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: artifacts | ||
- name: Move artifacts | ||
run: yarn artifacts | ||
- name: List packages | ||
run: ls -R ./npm | ||
shell: bash | ||
- name: Set NPM Provenance | ||
run: npm config set provenance true | ||
- name: Create Release Pull Request or Publish to npm | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
title: 'chore(release): version packages' | ||
commit: 'chore(release): version packages' | ||
publish: yarn release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
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