Skip to content

Release

Release #60

Workflow file for this run

# Code generated by craft; DO NOT EDIT.
name: Release
run-name: Release
on:
workflow_dispatch:
inputs:
mode:
description: Whether to only make a dry_run or to make the release completely
type: choice
default: dry_run
options:
- dry_run
- release
push:
branches:
- main
- master
- v[0-9]+.x
- v[0-9]+.[0-9]+.x
jobs:
version:
name: Version
runs-on: ubuntu-latest
if: ${{ github.ref_protected }}
environment: release
permissions:
contents: write
issues: write
pull-requests: write
outputs:
mode: ${{ steps.mode.outputs.mode }}
release: ${{ steps.version.outputs.release }}
version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@v4
- id: version
uses: ./.github/actions/version
with:
mode: dry_run # compute only the version to build
token: ${{ secrets.GITHUB_TOKEN }}
- id: mode
run: |
if [ "$GITHUB_EVENT_NAME" = "push" ]; then
echo "mode=release" >> $GITHUB_OUTPUT
exit 0
fi
echo "mode=${INPUT_MODE}" >> $GITHUB_OUTPUT
env:
INPUT_MODE: ${{ inputs.mode }}
golang:
name: Golang
needs: version
uses: ./.github/workflows/golang.yml
permissions:
checks: write
with:
build: true
version: ${{ needs.version.outputs.version }}
secrets: inherit
release:
name: Release
runs-on: ubuntu-latest
environment: release
permissions:
contents: write
issues: write
pull-requests: write
needs:
- version
- golang
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/version
with:
download_dist: true
mode: ${{ needs.version.outputs.mode }}
token: ${{ secrets.GITHUB_TOKEN }}