chore: fix release GitHub action trigger #114
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: | |
- '202*.*.*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build release artifacts | |
run: | | |
if [ -n "$(git status --porcelain)" ]; then | |
>&2 echo "ERROR: the git state is not clean, aborting build..." | |
exit 1 | |
fi | |
rm -rf /tmp/aspect/release | |
bazel run --config=release //release -- /tmp/aspect/release | |
if /tmp/aspect/release/aspect-linux_amd64 version | grep '(with local changes)'; then | |
>&2 echo "ERROR: the release contained changes in the git state and the release will not be produced" | |
exit 1 | |
fi | |
- name: Prepare workspace snippet | |
run: .github/workflows/install_snippet.sh > release_notes.txt | |
- name: Create GitHub draft release and upload artifacts | |
uses: softprops/action-gh-release@v1 | |
with: | |
# Use GH feature to populate the changelog automatically | |
generate_release_notes: true | |
body_path: release_notes.txt | |
files: /tmp/aspect/release/* |