-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (60 loc) · 1.85 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Release
on:
push:
paths:
- '.changeset/**'
- 'packages/**'
branches:
- main
permissions:
contents: write
id-token: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
release-npm:
name: Release to NPM
runs-on: ubuntu-latest
steps:
- name: checkout branch
uses: actions/checkout@v4
- name: install and configure git
uses: ./.github/common-actions/install
- name: build packages
run: pnpm build
- name: npm package registry authentication
run: npm set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: create release pull request or publish to NPM
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
title: 'ci(changesets): :package: version packages'
commit: 'ci(changesets): version packages'
setupGitUser: false
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release-grp:
name: Release to GRP
runs-on: ubuntu-latest
needs: release-npm
steps:
- name: checkout branch
uses: actions/checkout@v4
- name: Git fetch tags
run: git fetch --tags origin
- name: install and configure git
uses: ./.github/common-actions/install
- name: build packages
run: pnpm build
- name: get package registry GRP
run: npm config set registry https://npm.pkg.github.com
- name: github package registry authentication
run: npm set //npm.pkg.github.com/:_authToken=${{ secrets.GHP_PACKAGES_TOKEN }}
- name: publish packages on GRP
run: pnpm run release