Skip to content

Merge pull request #14 from cacoco/cacoco/Checkoutmain #9

Merge pull request #14 from cacoco/cacoco/Checkoutmain

Merge pull request #14 from cacoco/cacoco/Checkoutmain #9

Workflow file for this run

name: goreleaser
"on":
push:
tags:
- "*"
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
env:
# need to push to cacoco/homebrew-tap; use CACOCO_TOKEN instead of default GITHUB_TOKEN
GITHUB_TOKEN: ${{ secrets.CACOCO_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
- name: Set up Git Config
if: ${{ success() }}
run: |
git config user.name "goreleaserbot"
git config user.email "<bot@goreleaser.com>"
- name: Update codemeta.json version
if: ${{ success() }}
run: |
git checkout main
echo "`jq '.version="${{ github.ref_name }}"' codemeta.json`" > codemeta.json
git commit -am "Update codemeta.json version"
git push origin main