-
Notifications
You must be signed in to change notification settings - Fork 15
113 lines (98 loc) · 3.5 KB
/
flow-release-explorer.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: "Release Explorer"
on:
workflow_dispatch:
inputs:
dry-run-enabled:
description: "Perform Dry Run"
type: boolean
required: false
default: false
defaults:
run:
shell: bash
permissions:
id-token: write
packages: write
contents: read
jobs:
prepare-release:
name: Release / Prepare
runs-on: mirror-node-linux-medium
outputs:
version: ${{ steps.release.outputs.version }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 22
- name: Install Semantic Release
run: |
npm install -g [email protected] @semantic-release/[email protected] @semantic-release/[email protected] \
@semantic-release/[email protected] [email protected] \
@commitlint/[email protected] @commitlint/[email protected] \
- name: Calculate Next Version
env:
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
run: npx semantic-release --dry-run
- name: Retrieve Version
id: release
run: echo "version=$(cat VERSION)" >> "${GITHUB_OUTPUT}"
publish-container:
name: Publish
uses: ./.github/workflows/zxc-release-docker-container.yaml
needs:
- prepare-release
with:
new-version: ${{ needs.prepare-release.outputs.version }}
dry-run-enabled: ${{ inputs.dry-run-enabled }}
publish-chart:
name: Publish
uses: ./.github/workflows/zxc-release-helm-chart.yaml
needs:
- prepare-release
with:
new-version: ${{ needs.prepare-release.outputs.version }}
dry-run-enabled: ${{ inputs.dry-run-enabled }}
finalize-release:
name: Release / Finalize
runs-on: mirror-node-linux-medium
needs:
- publish-container
- publish-chart
if: ${{ inputs.dry-run-enabled != true }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 22
- name: Install Semantic Release
run: |
npm install -g [email protected] @semantic-release/[email protected] @semantic-release/[email protected] \
@semantic-release/[email protected] [email protected] \
@commitlint/[email protected] @commitlint/[email protected] \
- name: Finalize Release
env:
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
run: npx semantic-release