Add release to binary name #12
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
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Go | |
on: | |
push: | |
tags: 'v*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21.11' | |
- name: Install dependencies | |
run: | | |
go get . | |
- name: Build the executable | |
run: env GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o ipmitool_exporter-${{ github.ref }}-linux-amd64 ./main.go | |
- name: Create a release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
files: | | |
ipmitool_exporter-${{ github.ref }}-linux-amd64 |