Tag v1.15.11 (#2735) #55
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@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 | |
with: | |
egress-policy: audit | |
- | |
name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 | |
- | |
name: Set up Go | |
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | |
with: | |
go-version: '1.21' | |
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- uses: sigstore/cosign-installer@1fc5bd396d372bee37d608f955b336615edf79c8 # v3.2.0 | |
- uses: anchore/sbom-action/download-syft@fd74a6fb98a204a1ad35bbfae0122c1a302ff88b # v0.15.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@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # v6.0.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@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0 | |
with: | |
version: latest | |
args: release --rm-dist --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 }} | |