bugfix: Update Docker go image and remove dropped goreleaser flag #59
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
# This is a basic workflow to help you get started with Actions | |
name: release | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
tags: | |
- 'v*' | |
permissions: | |
contents: read | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 | |
with: | |
egress-policy: audit | |
- | |
name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
fetch-depth: 0 | |
- | |
name: Set up Go | |
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version: '1.22' | |
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0 | |
- uses: anchore/sbom-action/download-syft@d94f46e13c6c62f59525ac9a1e147a99dc0b9bf5 # v0.17.0 | |
# ubuntu is missing wixl https://github.com/actions/virtual-environments/issues/3857 | |
- | |
name: "Install GNOME msitools (wixl)" | |
run: sudo apt update -qq && sudo apt install -qq -y wixl | |
- | |
name: Import GPG signing key | |
id: import_gpg | |
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.PASSPHRASE }} | |
- | |
name: Debug | |
run: | | |
echo "GPG ---------------------" | |
echo "fingerprint: ${{ steps.import_gpg.outputs.fingerprint }}" | |
echo "keyid: ${{ steps.import_gpg.outputs.keyid }}" | |
echo "name: ${{ steps.import_gpg.outputs.name }}" | |
echo "email: ${{ steps.import_gpg.outputs.email }}" | |
echo "Go env ------------------" | |
pwd | |
echo ${HOME} | |
echo ${GITHUB_WORKSPACE} | |
echo ${GOPATH} | |
echo ${GOROOT} | |
env | |
- | |
name: Generate release-notes | |
run: | | |
go run helpers/changelog/main.go >../RELEASE_NOTES | |
- | |
name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0 | |
with: | |
version: latest | |
args: release --release-notes=../RELEASE_NOTES | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} | |
GOPATH: /home/runner/go | |
- | |
name: "Add Windows installer (msi) to release" | |
run: | # until https://github.com/goreleaser/goreleaser/issues/1295, disabled until #2038 is fixed | |
tag="${GITHUB_REF#refs/tags/}" | |
version=${tag#v} | |
make msi | |
msi=dist/gopass-x64-windows-${version}.msi | |
gh release upload "${tag}" "${msi}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
- | |
name: "Upload deb files to apt hosting" | |
run: | | |
for D in dist/*.deb; do | |
curl -H"X-Filename: ${D}" -H"X-Apikey: ${APIKEY}" -XPOST --data-binary @$D https://packages.gopass.pw/repos/gopass/upload | |
curl -H"X-Filename: ${D}" -H"X-Apikey: ${APIKEY}" -XPOST --data-binary @$D https://packages.gopass.pw/repos/gopass-unstable/upload | |
done | |
env: | |
APIKEY: ${{ secrets.APT_APIKEY }} | |