Release #23
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 | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
deploy: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23" | |
- name: Get tag | |
id: tag | |
uses: dawidd6/action-get-tag@v1 | |
with: | |
# Optionally strip `v` prefix | |
strip_v: true | |
- run: awk 'BEGIN { RS="# "; FS="\n"; OFS=""; ORS="" } NR == 2 { print "# Changes in ", $0 }' < CHANGELOG.md > RELEASE.md | |
- name: Release | |
uses: actions/create-release@v1 | |
id: create_release | |
with: | |
draft: false | |
prerelease: false | |
release_name: ${{ github.ref }} | |
tag_name: ${{ github.ref }} | |
body_path: RELEASE.md | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Build artifacts | |
run: | | |
go version | |
go install github.com/mitchellh/gox@latest | |
export version=${{ steps.tag.outputs.tag }} | |
make cross | |
- name: Upload Darwin ARM/M1 artifact | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/darwin_arm64_kd | |
asset_name: darwin_arm64_kd | |
asset_content_type: application/octet-stream | |
- name: Upload Darwin x64 artifact | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/darwin_amd64_kd | |
asset_name: darwin_amd64_kd | |
asset_content_type: application/octet-stream | |
- name: Upload Linux x64 artifact | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/linux_amd64_kd | |
asset_name: linux_amd64_kd | |
asset_content_type: application/octet-stream |