Release Workflow #43
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 Workflow | |
on: | |
workflow_dispatch: | |
inputs: | |
release-version: | |
description: 'Version being released, will be automatically prefixed with `v`. Example: 1.2.3' | |
required: true | |
branch: | |
description: 'Branch to release from' | |
required: true | |
default: 'main' | |
jobs: | |
call-build-test-and-push-workflow: | |
name: Call build, test and push workflow | |
uses: ./.github/workflows/build_reusable.yaml | |
with: | |
tags: latest v${{ github.event.inputs.release-version }} ${{ github.sha }} | |
push: true | |
secrets: inherit | |
github-release: | |
name: Build and push image | |
runs-on: ubuntu-20.04 | |
needs: | |
- call-build-test-and-push-workflow | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Bump version and push tag | |
id: tag_version | |
uses: mathieudutour/[email protected] | |
with: | |
github_token: ${{ secrets.HACBS_TEST_GITHUB_TOKEN }} | |
custom_tag: ${{ github.event.inputs.release-version }} | |
- name: Create a GitHub release | |
uses: ncipollo/[email protected] | |
with: | |
tag: ${{ steps.tag_version.outputs.new_tag }} | |
name: ${{ steps.tag_version.outputs.new_tag }} | |
body: ${{ steps.tag_version.outputs.changelog }} |