Skip to content

Commit 466d4df

Browse files
authored
Consolidate release workflow (#677)
1 parent 3a669b9 commit 466d4df

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
name: Release
22
on:
3-
release:
4-
types: [prereleased]
3+
workflow_dispatch:
4+
inputs:
5+
bump:
6+
type: choice
7+
required: true
8+
description: Bump version number
9+
options: [major, minor, patch]
10+
default: patch
511
jobs:
612
release:
713
runs-on: ubuntu-latest
@@ -14,15 +20,21 @@ jobs:
1420
printenv TERRAFORM_REGISTRY_GPG_PRIVATE_KEY | gpg --import
1521
env:
1622
TERRAFORM_REGISTRY_GPG_PRIVATE_KEY: ${{ secrets.TERRAFORM_REGISTRY_GPG_PRIVATE_KEY }}
23+
- run: |
24+
go install github.com/FalcoSuessgott/tago@v1.4.0
25+
tago --${{ github.event.inputs.bump }}
1726
- uses: goreleaser/goreleaser-action@v3
1827
with:
1928
args: release
2029
env:
2130
GITHUB_TOKEN: ${{ github.token }}
22-
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
23-
- run: gh release edit --prerelease=false ${{ github.event.release.tag_name }}
31+
- if: failure()
32+
run: >
33+
curl "$SLACK_WEBHOOK"
34+
--header 'Content-type: application/json'
35+
--data '{"text": "Release of <https://github.com/iterative/terraform-provider-iterative|terraform-provider-iterative> failed!"}'
2436
env:
25-
GITHUB_TOKEN: ${{ github.token }}
37+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
2638
synchronize:
2739
# Empyrically equivalent to pressing the "Resync" button in the Settings
2840
# page of Terraform Registry, but without bothering humans in the process

.goreleaser.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,5 @@ signs:
4949
- "${artifact}"
5050
changelog:
5151
skip: true
52-
announce:
53-
slack:
54-
enabled: true
55-
message_template: Succesfully released {{ .ProjectName }} {{.Tag}}
52+
release:
53+
draft: true

0 commit comments

Comments
 (0)