🧹 Do not explicitly set recording (#143) #18
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 Packer Plugin | |
on: | |
push: | |
tags: | |
- '*' | |
workflow_dispatch: | |
jobs: | |
goreleaser: | |
runs-on: self-hosted | |
env: | |
RUNNER_TYPE: "self-hosted" | |
timeout-minutes: 120 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Unshallow | |
run: git fetch --prune --unshallow | |
- name: Import environment variables from file | |
run: cat ".github/env" >> $GITHUB_ENV | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ">=${{ env.golang-version }}" | |
cache: false | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
version: latest | |
args: release --rm-dist --timeout 120m | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
API_VERSION: x5.0 | |
- name: Install Github CLI (gh) | |
if: ${{ env.RUNNER_TYPE != 'self-hosted' }} | |
run: | | |
# For shared runners we install gh, for private runners its already installed | |
wget https://github.com/cli/cli/releases/download/v2.20.2/gh_2.20.2_linux_amd64.deb | |
dpkg -i gh_2.20.2_linux_amd64.deb | |
- name: Duplicate Shasum | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release download ${{github.ref_name}} --pattern '*_SHA256SUMS' | |
mv packer-plugin-cnspec_${{github.ref_name}}_SHA256SUMS packer-plugin-mondoo_${{github.ref_name}}_SHA256SUMS | |
gh release upload ${{github.ref_name}} packer-plugin-mondoo_${{github.ref_name}}_SHA256SUMS |