Skip to content

Release

Release #54

Workflow file for this run

name: Release
on:
workflow_dispatch:
env:
COMMIT_NAME: Monkeynator
COMMIT_EMAIL: monkeynator@enix.io
jobs:
semver:
name: Semantic Version (dry-run)
runs-on: ubuntu-24.04
outputs:
published: ${{ steps.dry-run.outputs.new_release_published }}
last: ${{ steps.dry-run.outputs.last_release_version }}
version: ${{ steps.dry-run.outputs.new_release_version }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Run semantic-release (dry-run)
id: dry-run
uses: cycjimmy/semantic-release-action@v4
with:
semantic_version: v24.2.3 # FIXME: waiting for this to be merged https://github.com/cycjimmy/semantic-release-action/pull/245
dry_run: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Inspect semantic-release (dry-run) outcome
shell: python
env:
SR_PUBLISHED: ${{ steps.dry-run.outputs.new_release_published }}
SR_LAST: ${{ steps.dry-run.outputs.last_release_version }}
SR_VERSION: ${{ steps.dry-run.outputs.new_release_version }}
run: |
import os
import sys
if os.environ["SR_PUBLISHED"] == "true":
print("A new release should be published!")
print("Previous version: {}, next version: {}".format(os.environ["SR_LAST"], os.environ["SR_VERSION"]))
else:
print("Nothing should be published, skipping...")
sys.exit(1)
tests:
name: Tests
uses: ./.github/workflows/tests.yaml
needs:
- semver
build:
name: Build
uses: ./.github/workflows/build.yaml
needs:
- tests
- semver
with:
REPO_IMAGE: ${{ vars.REPO_IMAGE }}
REPO_LOGIN: ${{ vars.REPO_LOGIN }}
VERSION: ${{ needs.semver.outputs.version }}
secrets:
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
GH_TOKEN_PUBLISH_HELM_CHART: ${{ secrets.GH_TOKEN_PUBLISH_HELM_CHART }}
release:
name: Semantic Version
runs-on: ubuntu-24.04
needs:
- tests
- build
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Run semantic-release
uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_COMMITTER_NAME: ${{ env.COMMIT_NAME }}
GIT_COMMITTER_EMAIL: ${{ env.COMMIT_EMAIL }}
GIT_AUTHOR_NAME: ${{ env.COMMIT_NAME }}
GIT_AUTHOR_EMAIL: ${{ env.COMMIT_EMAIL }}