release PR refs/heads/main@ee261e9832ba397a498ea2e8db40ba7a7f2211e2 #2
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_pr | |
run-name: release PR ${{ github.ref }}@${{ github.sha }} | |
on: | |
workflow_dispatch: | |
inputs: | |
url: | |
description: Github repository URL to point commit links at | |
required: true | |
type: string | |
title: | |
description: Release title; new version and date will be added | |
type: string | |
tag_prefix: | |
description: Prefix to be concatenated to semver tag, i.e ${PREFIX}v1.0.0 | |
type: string | |
jobs: | |
release_pr: | |
name: release PR | |
runs-on: ubuntu-latest | |
steps: | |
- name: Validate branch | |
if: github.ref != 'refs/heads/main' && github.event.local != true | |
run: | | |
echo expected main, got: ${{ github.ref }} && exit 1 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-tags: true | |
fetch-depth: 0 | |
submodules: true | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23 | |
- run: go install github.com/tcodes0/go/cmd/[email protected] | |
- name: Update changelog | |
shell: bash | |
env: | |
CHANGELOG_FILE: CHANGELOG.md | |
BASH_ENV: ./lib.sh | |
run: ./workflows/release/changelog.sh "${{ inputs.url }}" "${{ inputs.title }}" "${{ inputs.tag_prefix }}" | |
- name: Open PR | |
uses: peter-evans/[email protected] | |
if: github.event.local != true | |
with: | |
commit-message: "chore: release ${{ inputs.title }}" | |
title: "chore: release ${{ inputs.title }}" | |
add-paths: . | |
body: "" | |
committer: release-workflow <41898282+github-actions[bot]@users.noreply.github.com> | |
branch: release-${{ inputs.title }} | |
branch-suffix: random |