Skip to content

Commit

Permalink
move notary to sign pipe
Browse files Browse the repository at this point in the history
moves the notary to goreleases sign pipe
  • Loading branch information
gorkem committed Mar 26, 2024
1 parent 4bfff2a commit aeb99d6
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_DEVELOPER_ID: ${{ secrets.APPLICATION_IDENTITY}}

- name: Notarize macOS archives
env:
APPLE_ID_PASSWORD: ${{ secrets.AC_PASSWORD }}
APPLE_DEVELOPER_ID: ${{ secrets.AC_USERNAME }}
APPLE_ID: ${{ vars.APPLE_ID }}
run: |
shopt -s failglob
build/scripts/sign dist/kitops-darwin*.zip
APPLE_ID_PASSWORD: ${{ secrets.AC_PASSWORD }}

- name: Generate CLI documentation
run: |
Expand Down
28 changes: 26 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ builds:
- cmd: ./build/scripts/sign '{{ .Path }}'
output: true
archives:
- format: tar.gz
- id: kit-archive
format: tar.gz
builds:
- kit
- kit-macos
name_template: >-
{{ .ProjectName }}-
{{- tolower .Os }}-
Expand All @@ -53,6 +53,30 @@ archives:
- LICENSE
- README.md

- id: kit-macos-archive
format: zip
builds:
- kit-macos
name_template: >-
{{ .ProjectName }}-
{{- tolower .Os }}-
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
files:
- LICENSE
- README.md

signs:
- artifacts: archive
ids:
- kit-macos-archive
signature: "${artifact}"
cmd: build/scripts/sign
args:
- "${artifact}"
output: true

changelog:
sort: asc
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/sign
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sign_macos() {
fi

if [[ $1 == *.zip ]]; then
xcrun notarytool submit "$1" --apple-id "${APPLE_ID?}" --team-id "${APPLE_DEVELOPER_ID?}" --password "${APPLE_ID_PASSWORD?}"
xcrun notarytool submit "$1" --apple-id "${APPLE_ID?}" --team-id "${APPLE_DEVELOPER_ID?}" --password "${APPLE_ID_PASSWORD?}" --wait
else
codesign --timestamp --options=runtime -s "${APPLE_DEVELOPER_ID?}" -v "$1"
fi
Expand Down

0 comments on commit aeb99d6

Please sign in to comment.