Skip to content

Commit a9c8358

Browse files
Added snapshot mode to allow testing from a branch and scafolding for uploading artifacts to the workflow
Signed-off-by: Gary Bright <gary@mondoo.com>
1 parent e338a9d commit a9c8358

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,20 @@ on:
1010
workflow_dispatch:
1111
inputs:
1212
skip-publish:
13-
description: "Skip publishing to the artifacts?"
13+
description: "Skip publishing? ie don't create a GitHub release."
1414
type: boolean
1515
required: false
1616
default: false
17+
goreleaser-snapshot:
18+
description: "Run goreleaser in snapshot mode? this will bypass tag checks."
19+
required: false
20+
default: false
21+
type: boolean
22+
upload-artifacts:
23+
description: "Uploading artifacts to workflow"
24+
required: false
25+
default: false
26+
type: boolean
1727

1828
# Releases need permissions to read and write the repository contents.
1929
# GitHub considers creating releases and uploading assets as writing contents.
@@ -110,7 +120,16 @@ jobs:
110120
--clean
111121
--timeout 30m
112122
${{ steps.skip-publish.outputs.skip-publish == 'true' && '--skip=publish' || '' }}
123+
${{ inputs.goreleaser-snapshot == true && '--snapshot' || '' }}
113124
env:
114125
# GitHub sets the GITHUB_TOKEN secret automatically.
115126
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
116127
NFPM_DEFAULT_RPM_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
128+
129+
- name: Upload artifacts
130+
if: ${{ inputs.upload-artifacts == true }}
131+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
132+
with:
133+
name: terraform-artifacts
134+
path: dist/
135+
retention-days: 3

0 commit comments

Comments
 (0)