generated from JoshuaKGoldberg/create-typescript-app
-
-
Notifications
You must be signed in to change notification settings - Fork 7
51 lines (44 loc) · 1.36 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
concurrency:
cancel-in-progress: false
group: Release
jobs:
release:
outputs:
did_release: ${{ steps.should_release.outputs.should_release }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/prepare
- run: pnpm build
- env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
- id: should_release
run: echo "should_release=$(pnpm run should-semantic-release &> /dev/null && echo '1' || echo '0')" >> "$GITHUB_OUTPUT"
- if: steps.should_release.outputs.should_release != '0'
uses: ./.github/actions/unprotect-main
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- env:
GITHUB_TOKEN: ${{ github.token }}
if: steps.should_release.outputs.should_release != '0'
run: pnpm release-it --verbose
- if: always() && steps.should_release.outputs.should_release != '0'
uses: ./.github/actions/protect-main
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
release_docs:
if: needs.release.outputs.did_release != '0'
needs: release
uses: ./.github/workflows/release-docs.yml
name: Release
on:
push:
branches:
- main
permissions:
contents: write
id-token: write
pages: write