-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (43 loc) · 1.22 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
name: Release
permissions:
pull-requests: write
on:
push:
paths:
- ".changeset/**"
- "packages/**"
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v3
with:
# see `fetch-depth` in README: https://github.com/actions/checkout#checkout-v3,
# we set to `0` so the referenced commits are available for the command below
fetch-depth: 0
- name: Prepare Environment
uses: ./.github/actions/setup-env
timeout-minutes: 10
- name: Creating .npmrc file
run: |
cp .npmrc.example .npmrc
sed -i "s/NPM_ACCESS_TOKEN/$NPM_TOKEN/g" .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Build
run: pnpm build:packages
- name: Create Release Pull Request
uses: changesets/action@v1
with:
publish: pnpm release
version: pnpm version-packages
commit: 'release: bump package(s)'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}