Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fixes. #17

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 22 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,24 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5

- name: Build go program
- name: Declare version
run: |
echo BUILD_VERSION="$(git describe --tags --always)" >> $GITHUB_ENV

- name: BUILD_VERSION go program
id: cgo-action
uses: go-cross/cgo-actions@v1
env:
BUILD_VERSION: ${{ env.BUILD_VERSION }}
with:
flags: -ldflags=-w -s -X 'github.com/Keeper-Security/linux-keyring-utility/cmd.Version=$(git describe --tags --always)'
flags: -ldflags=-X 'github.com/Keeper-Security/linux-keyring-utility/cmd.Version=${{ env.BUILD_VERSION }}'
targets: ${{ matrix.targets }}
output: lkru-${{ github.ref_name }}_$target$ext

- run: echo "${{ steps.cgo-action.outputs.files }}"

- name: Upload Release Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: binaries
name: binaries-${{ matrix.targets }}
path: |
bin/*-${{ github.ref_name }}_*

Expand All @@ -58,15 +62,20 @@ jobs:
passphrase: ${{ secrets.GPG_PASSPHRASE }}

- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: binaries

- name: Create checksums
path: bin
pattern: binaries-*
merge-multiple: true

- name: Strip binaries with symbols
run: |
shasum -a 256 *-${{ github.ref_name }}_* >| checksums.txt
file *-${{ github.ref_name }}_* checksums.txt
strip -s bin/*_linux-amd64

- name: Create checksums
run: |
cd bin; shasum -a 256 *-${{ github.ref_name }}_* >| ../checksums.txt

- name: Sign checksums
run: |
GPG_TTY=$(tty) gpg -vvv --batch --yes --detach-sign --armor \
Expand All @@ -89,7 +98,7 @@ jobs:
run: |
gh release upload "${{ github.ref_name }}" \
--repo "${{ github.repository }}" \
*-${{ github.ref_name }}_* \
bin/*-${{ github.ref_name }}_* \
checksums.txt checksums.txt.sig


Expand Down
Loading