-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AUT-250 - Missed that the deploy step also ran on merges to main. Mov…
…ing monitor zip build to seperate workflow (#988) * AUT-250 - Missed that the deploy step also ran on merges to main. Moving monitor zip build to seperate workflow. * Switching to publish the release automatically if one doesn't exist yet
- Loading branch information
1 parent
87f241b
commit 3b78727
Showing
2 changed files
with
40 additions
and
33 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Deploy | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9a-z]+.[0-9a-z]+' | ||
|
||
jobs: | ||
monitor: | ||
name: Build Monitor Lambda Zip | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
contents: write | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- name: Build monitor | ||
run: | | ||
cd tools/autograph-monitor | ||
make build | ||
- name: Create release draft if a release doesn't exist yet | ||
run: | | ||
EXISTING_RELEASE=$(gh release view $GITHUB_REF_NAME --json="id" || echo '') | ||
if [[ -z $EXISTING_RELEASE ]]; then | ||
gh release create $GITHUB_REF_NAME --generate-notes --latest | ||
fi | ||
- name: Upload zip package to release | ||
run: | | ||
gh release upload $GITHUB_REF_NAME "tools/autograph-monitor/autograph-monitor.zip" --clobber |
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