-
Notifications
You must be signed in to change notification settings - Fork 921
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
17 additions
and
16 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
name: CI and Release | ||
|
||
on: | ||
merge_group: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '**' | ||
release: | ||
types: [published] | ||
pull_request: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
version-bump: | ||
# Friendly description to be shown in the UI instead of 'name' | ||
description: "Semver type of new version (major / minor / patch)" | ||
# Input has to be provided for the workflow to run | ||
|
@@ -19,6 +22,9 @@ on: | |
- patch | ||
- minor | ||
- major | ||
tag-as: | ||
description: 'Tag for snapshot release (optional)' | ||
required: false | ||
|
||
jobs: | ||
# set up go version for use through pipelines, setting | ||
|
@@ -101,7 +107,7 @@ jobs: | |
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
default_bump: ${{ inputs.version }} | ||
default_bump: ${{ inputs.version-bump }} | ||
release_branches: ${{ needs.setup.outputs.branch }} | ||
|
||
# Generate the release with goreleaser to include pre-built binaries | ||
|
@@ -121,6 +127,13 @@ jobs: | |
with: | ||
go-version: ${{ needs.setup.outputs.go-version }} | ||
|
||
- name: Bump version and push tag | ||
if: ${{ github.event_name == 'workflow_dispatch' }} && ${{ inputs.tag-as }} != '' | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
custom_tag: ${{ inputs.tag-as }} | ||
|
||
- name: Import GPG key | ||
id: import_gpg | ||
uses: crazy-max/ghaction-import-gpg@v6 | ||
|
This file was deleted.
Oops, something went wrong.
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