Skip to content

Commit

Permalink
NH-85695 Add signing binaries mac (#20)
Browse files Browse the repository at this point in the history
* Add signing mac binaries
* Change golangci-lint
  • Loading branch information
ArkadiuszNitkaSWI authored Sep 5, 2024
1 parent 752155d commit 0329123
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59
version: v1.60.3
build:
runs-on: ubuntu-latest
steps:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ permissions:
jobs:
goreleaser:
runs-on: ubuntu-latest
environment: prod
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -37,3 +38,9 @@ jobs:
SP_CI_USER_TOKEN: ${{ secrets.SP_CI_USER_TOKEN }}
SP_ORGANIZATION_ID: ${{ secrets.SP_ORGANIZATION_ID }}
SP_PROJECT: ${{ secrets.SP_PROJECT }}

SWO_ISSUER_ID: ${{ secrets.SWO_ISSUER_ID }}
SWO_KEY_ID: ${{ secrets.SWO_KEY_ID }}
SWO_MAC_P8_FILE: ${{ secrets.SWO_MAC_P8_FILE }}
SWO_MAC_P12_CERT: ${{ secrets.SWO_MAC_P12_CERT }}
SWO_P12_PASSWORD: ${{ secrets.SWO_P12_PASSWORD }}
18 changes: 18 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ env:
- CGO_ENABLED=0
- REPO_OWNER=solarwinds
- REPO_NAME=swo-cli

builds:
- main: ./cmd/swo/main.go
id: linux
Expand All @@ -27,6 +28,7 @@ builds:
- SP_ARTIFACT_CONFIGURATION=exe
cmd: pwsh -c "Submit-SigningRequest -ApiToken "$env:SP_CI_USER_TOKEN" -OrganizationId "$env:SP_ORGANIZATION_ID" -ProjectSlug "$env:SP_PROJECT" -SigningPolicySlug "$env:SP_SIGNING_POLICY" -ArtifactConfigurationSlug "$env:SP_ARTIFACT_CONFIGURATION" -InputArtifactPath '{{ .Path }}' -OutputArtifactPath '{{ .Path }}' -Force -WaitForCompletion"
output: true

archives:
- builds:
- win
Expand All @@ -42,6 +44,22 @@ universal_binaries:
replace: true
name_template: "swo"

notarize:
macos:
- enabled: '{{ isEnvSet "SWO_MAC_P12_CERT" }}'
ids:
- mac
sign:
certificate: "{{.Env.SWO_MAC_P12_CERT}}"
password: "{{.Env.SWO_P12_PASSWORD}}"

notarize:
issuer_id: "{{.Env.SWO_ISSUER_ID}}"
key_id: "{{.Env.SWO_KEY_ID}}"
key: "{{.Env.SWO_MAC_P8_FILE}}"
wait: true
timeout: 20m

changelog:
disable: true

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
golangci-lint-version = v1.56.1
golangci-lint-version = v1.60.3

.PHONY: install-golangci-lint
install-golangci-lint:
Expand Down

0 comments on commit 0329123

Please sign in to comment.