Skip to content

Release/2.0.2 (#103) #22

Release/2.0.2 (#103)

Release/2.0.2 (#103) #22

Workflow file for this run

name: Publish
on:
push:
paths:
- ".speakeasy/gen.lock"
branches:
- main
workflow_dispatch:
# Releases need permissions to read and write the repository contents.
# GitHub considers creating releases and uploading assets as writing contents.
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
with:
# Allow goreleaser to access older tag information.
fetch-depth: 0
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version-file: "go.mod"
cache: true
- name: Read current version + create tag
run: |
TAG=$(yq '.management.releaseVersion' .speakeasy/gen.lock)
git config --global user.email "[email protected]"
git config --global user.name "kong-apiops[bot]"
git tag -a v$TAG -m "Release v$TAG"
git push origin v$TAG
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549 # v5.2.0
id: import_gpg
with:
gpg_private_key: ${{ secrets.TERRAFORM_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.TERRAFORM_GPG_PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0
with:
args: release --clean
version: ~> v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}