Skip to content

Commit

Permalink
ci: replace gon with rcodesign, switch to ubuntu runner
Browse files Browse the repository at this point in the history
  • Loading branch information
phm07 committed Apr 24, 2024
1 parent 1411498 commit e31dc65
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 54 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build:
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
release:
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -17,8 +17,8 @@ jobs:
with:
go-version-file: go.mod

- name: Set up gon
run: brew install mitchellh/gon/gon
- name: Setup rcodesign
uses: indygreg/apple-code-sign-action@v1

- name: Import GPG key
id: import_gpg
Expand All @@ -30,7 +30,9 @@ jobs:
- name: Decrypt Secrets
env:
SECRETS_PASSWORD: ${{ secrets.SECRETS_PASSWORD }}
run: bash script/decrypt_secrets.sh
run: |
gpg --quiet --batch --yes --decrypt --passphrase="$SECRETS_PASSWORD" \
--output .github/secrets/hcloud_cli.p12 .github/secrets/hcloud_cli.p12.gpg
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
Expand All @@ -39,6 +41,4 @@ jobs:
args: release --clean --skip=validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HC_APPLE_DEVELOPER_USER: ${{ secrets.HC_APPLE_DEVELOPER_USER }}
HC_APPLE_DEVELOPER_PASSWORD: ${{ secrets.HC_APPLE_DEVELOPER_PASSWORD }}
HC_APPLE_IDENTITY: ${{ secrets.HC_APPLE_IDENTITY }}
APPLE_P12_PASSWORD: ${{ secrets.APPLE_P12_PASSWORD }}
7 changes: 6 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ builds:
- arm64
hooks:
post:
- cmd: bash script/gon.sh "{{ .Path }}"
- cmd: >
rcodesign sign
--p12-file .github/secrets/hcloud_cli.p12
--p12-password "$APPLE_P12_PASSWORD"
--code-signature-flags runtime
"{{ .Path }}"
output: true
snapshot:
Expand Down
15 changes: 0 additions & 15 deletions script/decrypt_secrets.sh

This file was deleted.

30 changes: 0 additions & 30 deletions script/gon.sh

This file was deleted.

0 comments on commit e31dc65

Please sign in to comment.