Omit build job from CI #7
Workflow file for this run
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: Create plugin release | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
workflow_dispatch: | |
inputs: | |
is_draft_release: | |
description: "Whether a draft release should be created, instead of public one" | |
required: false | |
default: false | |
is_dry_run: | |
description: "Whether to create release" | |
required: false | |
default: false | |
golang_version: | |
description: "Golang version to use for building" | |
required: false | |
default: "1.22" | |
tag_name: | |
description: "Tag name to use for release" | |
required: true | |
env: | |
GOLANG_VERSION: ${{ github.event.inputs.golang_version || '1.22' }} | |
PLUGIN_NAME: "honeycomb-metric-plugin" | |
TAG_NAME: ${{ github.event.inputs.tag_name || github.event.ref_name }} | |
jobs: | |
release-creation: | |
name: Automatic release creation | |
runs-on: ubuntu-latest | |
env: | |
# Whether to create release | |
IS_DRY_RUN: false | |
# Whether a draft release should be created, instead of public one | |
IS_DRAFT_RELEASE: false | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Fetch tags | |
run: git fetch --tags --force | |
- name: Get current tag annotation | |
id: tag-data | |
uses: ericcornelissen/git-tag-annotation-action@v2 | |
with: | |
tag: ${{ env.TAG_NAME }} | |
- name: Set up Golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GOLANG_VERSION }} | |
- name: Build binaries | |
run: | | |
make release | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: ${{ env.TAG_NAME }} | |
release_name: Release ${{ env.TAG_NAME }} | |
body: ${{ steps.tag-data.outputs.git-tag-annotation }} | |
draft: ${{ env.IS_DRAFT_RELEASE }} | |
make_latest: true | |
files: | | |
./dist/${{ env.PLUGIN_NAME }}-linux-amd64 | |
./dist/${{ env.PLUGIN_NAME }}-linux-arm64 | |
./dist/${{ env.PLUGIN_NAME }}-darwin-amd64 | |
./dist/${{ env.PLUGIN_NAME }}-darwin-arm64 |