fixes #47
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
on: | |
push: | |
tags: | |
- v* | |
name: make-release | |
jobs: | |
makerelease: | |
name: make release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '1.19.x' | |
- name: Run make generate | |
run: | | |
make generate | |
shell: bash | |
# Ensure no files changed. | |
- name: Ensure no files changed | |
shell: bash | |
run: | | |
if [[ `git status --porcelain` ]]; then | |
echo "Files changed, exiting"; | |
exit 1; | |
else | |
# No changes | |
echo "No files changed, proceeding"; | |
fi | |
- name: Get if prerelease | |
shell: bash | |
id: extract_prerelease | |
run: | | |
if cat VERSION.txt | grep -q "rc"; then | |
echo "##[set-output name=prerelease;]$(echo true)" | |
else | |
echo "##[set-output name=prerelease;]$(echo false)" | |
fi | |
- name: Create a Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
prerelease: ${{steps.extract_prerelease.outputs.prerelease}} |