release cli #130
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: release cli | |
"on": | |
release: | |
branches: | |
- 'go' | |
types: | |
- 'released' | |
jobs: | |
binary: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21.1 | |
id: go | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Build | |
run: | | |
echo "Tag that is going to be used as digger version: ${{ github.event.release.tag_name }}" | |
env GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-X digger/pkg/utils.version=${{ github.event.release.tag_name }}" -o digger ./cli/cmd/digger | |
- name: Publish linux-x64 exec to github | |
id: upload-release-asset-linux-x64 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: 'digger' | |
asset_name: digger-cli-Linux-X64 | |
asset_content_type: application/octet-stream |