Skip to content

Commit

Permalink
Master flow 🤖
Browse files Browse the repository at this point in the history
  • Loading branch information
anttiviljami committed Jan 30, 2025
1 parent 3601831 commit 767f855
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 41 deletions.
29 changes: 28 additions & 1 deletion .github/workflows/autorelease.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
name: Autorelease

# on each main branch push, bump version and publish a release
# On each main branch push, bump version and publish a release
"on":
push:
branches:
- main

# Releases need permissions to read and write the repository contents.
# GitHub considers creating releases and uploading assets as writing contents.
permissions:
contents: write

jobs:
autorelease:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

# Semver
- name: Get Next Version
id: semver
uses: ietf-tools/semver-action@v1
Expand All @@ -31,3 +38,23 @@ jobs:
tag: ${{ steps.semver.outputs.next }}
body: Update Terraform Provider with latest API changes
token: ${{ secrets.GITHUB_TOKEN }}

# Goreleaser
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version-file: 'go.mod'
cache: true
- 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
env:
# GitHub sets the GITHUB_TOKEN secret automatically.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
40 changes: 0 additions & 40 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit 767f855

Please sign in to comment.