diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 58cd13a..8ffa437 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,48 +46,9 @@ jobs: if: startsWith(github.ref, 'refs/tags/') with: version: latest - args: release --clean --config .goreleaser.yml - env: - GITHUB_TOKEN: ${{ github.token }} - GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} - - release-macos: - name: Release - - runs-on: macos-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Go - uses: actions/setup-go@v3 - with: - go-version: '1.21' - - - name: Cache Go modules - uses: actions/cache@v3 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - - name: Import GPG key - id: import_gpg - uses: crazy-max/ghaction-import-gpg@v5 - with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.PASSPHRASE }} - - - name: Release - uses: goreleaser/goreleaser-action@v4 - if: startsWith(github.ref, 'refs/tags/') - with: - version: latest - args: release --clean --config .goreleaser.osx.yml + args: release --clean env: GITHUB_TOKEN: ${{ github.token }} GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} + DOCKER_REGISTRY: ghcr.io/ah-dark + DOCKER_IMAGE_NAME: epay-cli diff --git a/.goreleaser.osx.yml b/.goreleaser.osx.yml deleted file mode 100644 index 5011834..0000000 --- a/.goreleaser.osx.yml +++ /dev/null @@ -1,70 +0,0 @@ -project_name: epay-cli - -before: - hooks: - - go mod tidy - -builds: - - id: epay-cli - main: . - binary: epay-cli - env: - - CGO_ENABLED=0 - - >- - {{- if eq .Arch "amd64"}}CC=o64-clang{{- end }} - {{- if eq .Arch "arm64"}}CC=aarch64-apple-darwin20.2-clang{{- end }} - ldflags: - - -s -w -X main.version={{ .Version }} -X main.commit={{ .Commit }} -X main.date={{ .Date }} - goos: - - "darwin" - goarch: - - "amd64" - - "arm64" - -universal_binaries: - - id: epay-cli - -signs: - - artifacts: checksum - args: ["--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"] - -archives: - - format: tar.gz - # this name template makes the OS and Arch compatible with the results of uname. - name_template: >- - {{ .ProjectName }}_ - {{- title .Os }}_ - {{- if eq .Arch "amd64" }}x86_64 - {{- else if eq .Arch "386" }}i386 - {{- else }}{{ .Arch }}{{ end }} - {{- if .Arm }}v{{ .Arm }}{{ end }} - files: - - src: data/* - dst: data - info: - owner: root - group: root - mtime: "{{ .CommitDate }}" - mode: 0644 - -release: - github: - owner: AH-dark - name: epay-cli - draft: true - replace_existing_draft: true - prerelease: auto - mode: append - -checksum: - name_template: 'checksums.txt' - -snapshot: - name_template: "{{ incpatch .Version }}-next" - -changelog: - sort: asc - filters: - exclude: - - '^doc:' - - '^test:' diff --git a/.goreleaser.yml b/.goreleaser.yml index b9ab9b7..d74e287 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -28,6 +28,9 @@ builds: - "arm64" - "arm" +universal_binaries: + - id: epay-cli + signs: - artifacts: checksum args: ["--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"]