Skip to content

Bump github.com/keeper-security/secrets-manager-go/core (#19) #18

Bump github.com/keeper-security/secrets-manager-go/core (#19)

Bump github.com/keeper-security/secrets-manager-go/core (#19) #18

Workflow file for this run

name: release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
release:
env:
ARCHES: amd64 arm64
COMMANDS: aws-credential-process
OSES: darwin linux windows
environment: release
runs-on: macos-latest
steps:
- uses: apple-actions/import-codesign-certs@v2
with:
create-keychain: true
keychain: codesign
p12-file-base64: ${{ secrets.CODESIGN_CERT_P12 }}
p12-password: ${{ secrets.CODESIGN_CERT_P12_PWD }}
- uses: crazy-max/ghaction-import-gpg@v6
with:
fingerprint: "${{ secrets.GPG_FINGERPRINT }}"
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- run: go test -v ./...
- name: Build Linux, MacOS and Windows binaries
run: |
for arch in $ARCHES; do
for os in $OSES; do
for command in $COMMANDS; do
bin="keeper-${command}-${{ github.ref_name }}_${os}_${arch}";
test "${os}" = 'windows' && bin="${bin}.exe";
GOOS=$os GOARCH=$arch go build -v -o "${bin}" ./cmd/$command;
done;
done;
done
- name: Sign and notarize MacOS binaries
run: |
for arch in $ARCHES; do
for command in $COMMANDS; do
bin="keeper-${command}-${{ github.ref_name }}_darwin_${arch}";
codesign --sign 234QNB7GCA --options runtime --timestamp "${bin}";
zip="${bin}.zip";
zip "${zip}" "${bin}";
rm -f "${bin}";
xcrun notarytool submit "${zip}" \
--apple-id '[email protected]' \
--team-id 234QNB7GCA \
--password '${{ secrets.APP_SPECIFIC_PASSWORD }}' \
--wait;
done;
done
- name: Create checksums
run: |
shasum -a 256 *-${{ github.ref_name }}_*_* >| checksums.txt
file *-${{ github.ref_name }}_*_* checksums.txt
- name: Sign checksums
run: |
GPG_TTY=$(tty) gpg -vvv --batch --yes --detach-sign --armor \
--local-user "${{ secrets.GPG_FINGERPRINT }}" \
--output checksums.txt.sig \
--passphrase "${{ secrets.GPG_PASSPHRASE }}" \
--pinentry-mode loopback checksums.txt
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "${{ github.ref_name }}" \
--title "${{ github.ref_name }}" \
--repo "${{ github.repository }}" \
--generate-notes
- name: Upload artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${{ github.ref_name }}" \
--repo "${{ github.repository }}" \
*-${{ github.ref_name }}_*_* \
checksums.txt checksums.txt.sig