-
-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (37 loc) · 1.08 KB
/
publish.yml
File metadata and controls
40 lines (37 loc) · 1.08 KB
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
name: Publish
on:
push:
branches:
- main
paths:
- "**/CHANGELOG.md"
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
publish:
name: Publish
permissions:
id-token: write
contents: write
pull-requests: write
runs-on: ubuntu-latest
if: |
contains(github.event.head_commit.message, 'meta(changelog)')
&& contains(github.event.head_commit.message, 'Update package versions')
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
cache: yarn
node-version-file: "package.json"
- name: Install
run: yarn install
- name: Build
run: yarn build
- name: Publish to NPM
uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
with:
publish: yarn changeset:publish
createGithubReleases: true