-
Notifications
You must be signed in to change notification settings - Fork 11
45 lines (42 loc) · 1.22 KB
/
release.yaml
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
name: Release
on:
pull_request:
types: [closed]
branches: [master]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release:
# Only run this job if the pull request was pull request from changesets
if: |
(github.event_name == 'workflow_dispatch') ||
(github.event.pull_request.merged == true &&
github.event.pull_request.title == 'Version Packages')
name: Release on GitHub and publish to npm
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
id-token: write
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
ref: master
- name: Install dependencies
uses: ./.github/actions/install-dependencies
with:
node_version: 20
- name: Build
uses: ./.github/actions/build
- name: Create Release and Publish
uses: changesets/action@v1
env:
GITHUB_TOKEN: ${{ secrets.REPOSITORY_ACCESS_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
with:
createGithubReleases: true
publish: "npm run changeset:publish"