Sign MacOS Binaries with JFrog Certificate #3
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: Sign MacOS Binaries | ||
on: [push] | ||
jobs: | ||
# Sign the JFrog CLI binary for macOS | ||
DeleteOldArtifacts: | ||
- name: Delete-Old-Artifacts | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: kolpav/purge-artifacts-action@v1 | ||
with: | ||
token: ${{ secrets.JF_GIT_TOKEN }} | ||
expire-in: 0 # Setting this to 0 will delete all artifacts | ||
SignBinary: | ||
# if: ${{ contains(github.event.head_commit.message, 'Bump version from') }} | ||
needs: DeleteOldArtifacts | ||
name: Sign-JFrog-CLI-MacOS-Binary | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
goarch: [arm64,amd64] | ||
steps: | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.22.x | ||
cache: false | ||
- name: Set Environment Variable | ||
run: echo "goarch=${{ matrix.goarch }}" >> $GITHUB_ENV | ||
- name: Checkout Source | ||
uses: actions/checkout@v4 | ||
- name: Build | ||
run: ./build/build.sh | ||
- name: Sign Binary | ||
env: | ||
APPLE_CERT_DATA: ${{ secrets.APPLE_CERT_DATA }} | ||
APPLE_CERT_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }} | ||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | ||
run: ./build/macOsSign/signMacOsBinary.sh | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: jf-darwin-${{ matrix.goarch }} | ||
path: ./jf | ||
retention-days: 1 |