forked from keybase/kbpgp
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (52 loc) · 1.5 KB
/
promote.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
name: promote
on:
push:
branches-ignore:
- gh-readonly-queue/**
merge_group:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
DRY_RUN: ${{ github.ref_name != 'main' && !startsWith(github.ref_name, 'maint/')}}
jobs:
build:
uses: ./.github/workflows/build.yaml
permissions:
contents: read
checks: write
release:
needs:
- build
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write
# packages: write
issues: write
id-token: write
steps:
# full checkout for semantic-release
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
show-progress: false
fetch-depth: 0
filter: blob:none
- name: Setup pnpm
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
- name: Setup node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: .node-version
cache: pnpm
- name: Install project
run: pnpm install --frozen-lockfile
- name: semantic-release
if: github.event_name == 'push'
run: pnpm semantic-release --dry-run ${{env.DRY_RUN}} --ci ${{env.DRY_RUN != 'true'}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}