Merge pull request #51 from k0sproject/drop-serve #14
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: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
jobs: | |
prepare: | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-20.04 | |
outputs: | |
tag: ${{ steps.tag-name.outputs.tag }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Tag name | |
id: tag-name | |
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
publish_binaries: | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: prepare | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Build binaries | |
id: build_bins | |
env: | |
TAG_NAME: ${{ needs.prepare.outputs.tag }} | |
run: make build-all | |
- name: Create release and upload binaries | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
bin/bootloose-* | |
bin/sha256sums.txt | |
body_path: bin/sha256sums.md | |
tag_name: ${{ needs.prepare.outputs.tag }} | |
name: ${{ needs.prepare.outputs.tag }} | |
draft: true # So we can manually edit before publishing | |
prerelease: ${{ contains(needs.prepare.outputs.tag, '-') }} # v0.1.2-beta1, 1.2.3-rc1 |