Skip to content

Commit

Permalink
🤖 Automatically create GH release after cnspec bump (#253)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Zunker <[email protected]>
  • Loading branch information
czunker authored May 16, 2024
1 parent 2496af2 commit 92777aa
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cnspec-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
MAJOR=$(echo "${{ steps.version.outputs.version }}" | cut -d. -f1)
go get go.mondoo.com/cnspec/${MAJOR}@${{ steps.version.outputs.version }}
go mod tidy
echo "${{ steps.version.outputs.version }}" > VERSION
- name: Prepare title and branch name
id: branch
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/gh-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Create GitHub Release

## Only trigger release when the VERSION file changed
on:
push:
paths:
- "VERSION"

jobs:
create-gh-release:
name: GH Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set release version
run: echo "RELEASE_VERSION=$(cat VERSION)" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.RELEASE_VERSION }}
generate_release_notes: true
make_latest: true
# for testing purposes
draft: true

0 comments on commit 92777aa

Please sign in to comment.