generated from napi-rs/package-template
-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (53 loc) · 1.41 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Release
on:
push:
branches:
- main
paths-ignore:
- '**/*.md'
- LICENSE
- '**/*.gitignore'
- .editorconfig
- docs/**
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'
version: yarn bump
publish: npx changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}