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

move notary to sign pipe #165

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
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
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