Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🤖 Automatically create GH release after cnspec bump #253

Merged
merged 1 commit into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Loading