From 9e26208e13bcab1d0b92dafddabf070af222cac9 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 13 Apr 2023 16:49:50 +0800 Subject: [PATCH] Add signature for tag releases, upload to gitea releases itself (#116) GPG signature keys are not set yet. Reviewed-on: https://gitea.com/gitea/act_runner/pulls/116 Reviewed-by: Jason Song Co-authored-by: Lunny Xiao Co-committed-by: Lunny Xiao --- .gitea/workflows/release-tag.yml | 9 +++++++++ .goreleaser.yaml | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/.gitea/workflows/release-tag.yml b/.gitea/workflows/release-tag.yml index 10a1306..22c6178 100644 --- a/.gitea/workflows/release-tag.yml +++ b/.gitea/workflows/release-tag.yml @@ -16,6 +16,12 @@ jobs: - uses: actions/setup-go@v3 with: go-version: '>=1.20.1' + - 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: goreleaser uses: https://github.com/goreleaser/goreleaser-action@v4 with: @@ -29,3 +35,6 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} S3_REGION: ${{ secrets.AWS_REGION }} S3_BUCKET: ${{ secrets.AWS_BUCKET }} + GORELEASER_FORCE_TOKEN: 'gitea' + GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 8b82908..a4b87ab 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -103,5 +103,9 @@ snapshot: nightly: name_template: "{{ .Branch }}" +gitea_urls: + api: https://gitea.com/api/v1 + download: https://gitea.com + # yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json # vim: set ts=2 sw=2 tw=0 fo=cnqoj \ No newline at end of file