Skip to content

Commit

Permalink
Disable macOS notarization (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
zmoog authored Mar 9, 2024
1 parent 45280f0 commit 0595a22
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 43 deletions.
35 changes: 23 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,29 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: 1.20.2
- name: Install gon for code signing and notarization
run: |
wget -q https://github.com/mitchellh/gon/releases/download/v0.2.5/gon_macos.zip -O /tmp/gon_macos.zip
unzip /tmp/gon_macos.zip -d /usr/local/bin
- name: Set up keychain for macOS code-signing and notarization
env:
KEYCHAIN_PATH: "/tmp/apple-developer.keychain-db"
run: |
echo "${{ secrets.KEYCHAIN_CONTENT }}" | base64 --decode > ${{ env.KEYCHAIN_PATH }}
security default-keychain -s ${{ env.KEYCHAIN_PATH }}
security unlock-keychain -p "${{ secrets.KEYCHAIN_PASSWORD }}" "${{ env.KEYCHAIN_PATH }}"
git status
#
# Uncomment the following lines if you want to use macOS notarization
# ---------------------------------------------------------------
#
# I have commented out the following lines because I don't have a
# paid Apple Developer account anymore.
#
# Since I'm probably the only one who will ever use this, I'm not
# goint to spend $99/year until I have a good reason to do so.
#
# - name: Install gon for code signing and notarization
# run: |
# wget -q https://github.com/mitchellh/gon/releases/download/v0.2.5/gon_macos.zip -O /tmp/gon_macos.zip
# unzip /tmp/gon_macos.zip -d /usr/local/bin
# - name: Set up keychain for macOS code-signing and notarization
# env:
# KEYCHAIN_PATH: "/tmp/apple-developer.keychain-db"
# run: |
# echo "${{ secrets.KEYCHAIN_CONTENT }}" | base64 --decode > ${{ env.KEYCHAIN_PATH }}
# security default-keychain -s ${{ env.KEYCHAIN_PATH }}
# security unlock-keychain -p "${{ secrets.KEYCHAIN_PASSWORD }}" "${{ env.KEYCHAIN_PATH }}"
# git status

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
Expand Down
73 changes: 42 additions & 31 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,51 @@ builds:
goos:
- linux
# - windows
# - darwin
main: ./entrypoints/cli

- binary: classeviva
id: classeviva-macos-amd64
ldflags:
- -s -w -X github.com/zmoog/classeviva/commands.version={{.Version}} -X github.com/zmoog/classeviva/commands.commit={{.Commit}} -X github.com/zmoog/classeviva/commands.date={{.Date}} -X github.com/zmoog/classeviva/commands.builtBy=goreleaser
env:
- CGO_ENABLED=0
goos:
- darwin
goarch:
- amd64
main: ./entrypoints/cli
hooks:
post:
- cmd: gon gon.config.amd64.hcl
output: true

- binary: classeviva
id: classeviva-macos-arm64
ldflags:
- -s -w -X github.com/zmoog/classeviva/commands.version={{.Version}} -X github.com/zmoog/classeviva/commands.commit={{.Commit}} -X github.com/zmoog/classeviva/commands.date={{.Date}} -X github.com/zmoog/classeviva/commands.builtBy=goreleaser
env:
- CGO_ENABLED=0
goos:
- darwin
goarch:
- arm64
main: ./entrypoints/cli
hooks:
post:
- cmd: gon gon.config.arm64.hcl
output: true
#
# Uncomment the following lines if you want to use macOS notarization
# ---------------------------------------------------------------
#
# I have commented out the following lines because I don't have a
# paid Apple Developer account anymore.
#
# Since I'm probably the only one who will ever use this, I'm not
# goint to spend $99/year until I have a good reason to do so.
#

# - binary: classeviva
# id: classeviva-macos-amd64
# ldflags:
# - -s -w -X github.com/zmoog/classeviva/commands.version={{.Version}} -X github.com/zmoog/classeviva/commands.commit={{.Commit}} -X github.com/zmoog/classeviva/commands.date={{.Date}} -X github.com/zmoog/classeviva/commands.builtBy=goreleaser
# env:
# - CGO_ENABLED=0
# goos:
# - darwin
# goarch:
# - amd64
# main: ./entrypoints/cli
# hooks:
# post:
# - cmd: gon gon.config.amd64.hcl
# output: true

# - binary: classeviva
# id: classeviva-macos-arm64
# ldflags:
# - -s -w -X github.com/zmoog/classeviva/commands.version={{.Version}} -X github.com/zmoog/classeviva/commands.commit={{.Commit}} -X github.com/zmoog/classeviva/commands.date={{.Date}} -X github.com/zmoog/classeviva/commands.builtBy=goreleaser
# env:
# - CGO_ENABLED=0
# goos:
# - darwin
# goarch:
# - arm64
# main: ./entrypoints/cli
# hooks:
# post:
# - cmd: gon gon.config.arm64.hcl
# output: true

archives:
- replacements:
Expand Down

0 comments on commit 0595a22

Please sign in to comment.