-
Notifications
You must be signed in to change notification settings - Fork 62
42 lines (36 loc) · 1.19 KB
/
pr-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
name: Release
on:
push:
branches:
- master
permissions: {}
jobs:
pr-release:
permissions:
contents: write # to create release (changesets/action)
pull-requests: write # to create pull request (changesets/action)
timeout-minutes: 15
runs-on: macos-latest
steps:
- name: Checkout code repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- name: Install deps and audit
uses: ./.github/actions/setup
- name: Set up NPM credentials
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create versions PR & prepare publish
id: changesets
uses: changesets/action@v1
with:
version: pnpm ci:version
commit: 'chore(deploy): Release'
title: 'chore(deploy): Release'
publish: pnpm ci:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}