-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (66 loc) · 1.96 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Release
on:
push:
branches:
- main
permissions: {}
defaults:
run:
shell: bash
jobs:
check:
permissions:
# we must pass all the required permissions of the callee workflow
contents: read
actions: read
uses: ./.github/workflows/check.yml
test:
permissions:
# we must pass all the required permissions of the callee workflow
contents: read
actions: read
uses: ./.github/workflows/test.yml
release:
needs:
- check
- test
runs-on: ubuntu-22.04
permissions:
contents: write # for GitHub Release
issues: write # for commenting on issues
pull-requests: write # for commenting on pull requests
id-token: write # for npm provenance
steps:
- name: Checkout
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
with:
fetch-depth: 0 # fetch all history for semantic-release
- name: Setup bun
uses: oven-sh/setup-bun@8f24390df009a496891208e5e36b8a1de1f45135 # v1.2.1
- name: Setup Node.js
# Install to use the new version of npm in semantic-release
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: package.json
- name: Install Dependencies
run: bun install --frozen-lockfile
env:
HUSKY: 0
- name: Build
run: bun run tsc --project tsconfig.src.json --incremental false
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: bun run semantic-release
actions-timeline:
needs:
- release
if: ${{ !cancelled() }}
runs-on: ubuntu-22.04
permissions:
actions: read # for actions-timeline
steps:
- name: actions-timeline
# cspell:ignore kesin
uses: Kesin11/actions-timeline@b03a6aa289adef5534c84ccb6fbef7c975973574 # v2.1.0