-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (61 loc) · 1.98 KB
/
release-please.yml
File metadata and controls
67 lines (61 loc) · 1.98 KB
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
name: release-please
on:
push:
branches:
- main
schedule:
- cron: '1 0 * * *'
permissions:
contents: write
pull-requests: write
id-token: write
jobs:
# 1. THE CORE RELEASE-PLEASE JOB
# This job runs on push (to finalize release) and on schedule (to create/update PR).
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: googleapis/release-please-action@v4
id: release
# 2. STABLE RELEASE FLOW (Runs ONLY when a new tag is created by release-please)
# This only runs when `release_created` is true (after a release PR is merged).
build-stable:
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
uses: City-of-Helsinki/.github/.github/workflows/ci-node.yml@main
secrets: inherit
with:
node-version: '22'
upload_artifacts: true
skip_sonar: true
publish:
needs: build-stable
secrets: inherit
uses: City-of-Helsinki/.github/.github/workflows/ci-npm-publish.yml@main
with:
node-version: '22'
use-ci-build: true
# 3. CANARY RELEASE FLOW (Runs on every push to main, EXCLUDING schedule)
# The event name is 'push' when a commit is pushed to main.
# (FYI: The event name is 'schedule' when the cron runs.)
build-canary:
# This conditional ensures it runs ONLY when the workflow was triggered by a commit push.
if: github.event_name == 'push'
uses: City-of-Helsinki/.github/.github/workflows/ci-node.yml@main
secrets: inherit
with:
node-version: '22'
upload_artifacts: true
skip_sonar: true
publish-npm-canary:
# This conditional is redundant but good practice; it will only run if its dependency runs.
if: github.event_name == 'push'
needs: build-canary
secrets: inherit
uses: City-of-Helsinki/.github/.github/workflows/ci-npm-publish.yml@main
with:
node-version: '22'
use-ci-build: true
canary: true