Create release package #15
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 release package | |
on: | |
create: | |
tags: | |
- v* | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Set env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.16 | |
- name: Build | |
run: go build -v -o release/coronacheck-hcert ./ | |
- name: Create version.json | |
run: 'echo "{ \"version\": \"${{ env.RELEASE_VERSION }}\", \"git_ref\": \"$GITHUB_SHA\"}" > release/version.json' | |
- name: Create tar | |
run: cd release && tar -czf ../coronacheck_hcert_${{ env.RELEASE_VERSION }}.tar.gz ./ | |
- name: Upload release tar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coronacheck_hcert_${{ env.RELEASE_VERSION }} | |
path: coronacheck_hcert_${{ env.RELEASE_VERSION }}.tar.gz |