Release Explorer #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 | |
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@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.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] \ | |
[email protected] \ | |
@commitlint/[email protected] @commitlint/[email protected] \ | |
[email protected] [email protected] [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@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 | |
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@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.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] \ | |
[email protected] \ | |
@commitlint/[email protected] @commitlint/[email protected] \ | |
[email protected] [email protected] [email protected] | |
- name: Finalize Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
run: npx semantic-release |