diff --git a/.github/.goreleaser-unstable.yml b/.github/.goreleaser-unstable.yml index 951715b714..f8f9e2f623 100644 --- a/.github/.goreleaser-unstable.yml +++ b/.github/.goreleaser-unstable.yml @@ -62,10 +62,6 @@ builds: - -s -w -X go.mondoo.com/cnquery/v9.Version={{.Version}} -X go.mondoo.com/cnquery/v9.Build={{.ShortCommit}} -X go.mondoo.com/cnquery/v9.Date={{.Date}} hooks: post: - - cmd: ./scripts/windows-upx.sh "{{ .Path }}" - output: true - env: - - TARGET={{ .Target }} - cmd: jsign --storetype DIGICERTONE --alias "{{ .Env.SM_CERT_ALIAS }}" --storepass "{{ .Env.SM_API_KEY }}|{{ .Env.SM_CLIENT_CERT_FILE}}|{{ .Env.SM_CLIENT_CERT_PASSWORD }}" --tsaurl "http://timestamp.digicert.com" '{{ .Path }}' nfpms: - diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index c4e35d5a73..8f4a5159a8 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -34,7 +34,7 @@ jobs: - name: Skip Publish for Alpha and Beta Tags id: skip-publish - if: contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') || inputs.skip-publish == 'true' + if: contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') || inputs.skip-publish == true run: | echo "Skipping publish for alpha and beta tags" echo "skip-publish=true" >> $GITHUB_OUTPUT @@ -42,7 +42,7 @@ jobs: - name: Import environment variables from file run: cat ".github/env" >> $GITHUB_ENV - + - name: Set up Go uses: actions/setup-go@v4 with: @@ -127,13 +127,13 @@ jobs: QUILL_NOTARY_KEY_ID: ${{ secrets.APPLE_NOTARY_KEY_ID }} QUILL_NOTARY_ISSUER: ${{ secrets.APPLE_NOTARY_ISSUER }} - - name: Run GoReleaser (w/o Docker Release) + - name: Run GoReleaser (Build Binaries Only) if: ${{ steps.skip-publish.outputs.skip-publish == 'true' }} uses: goreleaser/goreleaser-action@v5 with: distribution: goreleaser version: latest - args: release -f .github/.goreleaser-unstable.yml --clean --timeout 120m + args: build -f .github/.goreleaser-unstable.yml --timeout 120m --snapshot env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CERT_PASSWORD: ${{ steps.gcp_secrets.outputs.code_sign_cert_challenge }} @@ -168,6 +168,13 @@ jobs: "version": "${{ github.ref_name }}" }' + - name: Save Artifacts + if: ${{ steps.skip-publish.outputs.skip-publish }} + uses: actions/upload-artifact@v3 + with: + name: build_artifacts + path: dist/ + - name: Cleanup if: always() run: diff --git a/.goreleaser.yml b/.goreleaser.yml index fa591b7fbb..0578c4302b 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -62,10 +62,10 @@ builds: - -s -w -X go.mondoo.com/cnquery/v9.Version={{.Version}} -X go.mondoo.com/cnquery/v9.Build={{.ShortCommit}} -X go.mondoo.com/cnquery/v9.Date={{.Date}} hooks: post: - - cmd: ./scripts/windows-upx.sh "{{ .Path }}" - output: true - env: - - TARGET={{ .Target }} + # - cmd: ./scripts/windows-upx.sh "{{ .Path }}" + # output: true + # env: + # - TARGET={{ .Target }} - cmd: jsign --storetype DIGICERTONE --alias "{{ .Env.SM_CERT_ALIAS }}" --storepass "{{ .Env.SM_API_KEY }}|{{ .Env.SM_CLIENT_CERT_FILE}}|{{ .Env.SM_CLIENT_CERT_PASSWORD }}" --tsaurl "http://timestamp.digicert.com" '{{ .Path }}' nfpms: -