Skip to content

Commit fcd799a

Browse files
committed
chore: require approval for release job
1 parent f09e11d commit fcd799a

File tree

3 files changed

+28
-17
lines changed

3 files changed

+28
-17
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,29 @@ permissions:
1515

1616
jobs:
1717
goreleaser:
18+
environment: production
1819
runs-on: ubuntu-latest
1920
steps:
20-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
21+
- uses: actions/checkout@v4
2122
with:
2223
# Allow goreleaser to access older tag information.
2324
fetch-depth: 0
24-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
25+
- uses: actions/setup-go@v5
2526
with:
2627
go-version-file: 'go.mod'
2728
cache: true
28-
- name: Import GPG key
29-
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
30-
id: import_gpg
29+
- id: import_gpg
30+
uses: crazy-max/ghaction-import-gpg@v6
3131
with:
3232
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
3333
passphrase: ${{ secrets.PASSPHRASE }}
34-
- name: Run GoReleaser
35-
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0
34+
- uses: goreleaser/goreleaser-action@v5
3635
with:
3736
args: release --clean
3837
env:
3938
# GitHub sets the GITHUB_TOKEN secret automatically.
4039
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4140
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
41+
- run: gh release edit ${{ github.ref_name }} --draft=false
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@ jobs:
2424
runs-on: ubuntu-latest
2525
timeout-minutes: 5
2626
steps:
27-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
28-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
27+
- uses: actions/checkout@v4
28+
- uses: actions/setup-go@v5
2929
with:
3030
go-version-file: 'go.mod'
3131
cache: true
3232
- run: go mod download
3333
- run: go build -v .
3434
- name: Run linters
35-
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
35+
uses: golangci/golangci-lint-action@v3
3636
with:
3737
version: latest
3838

3939
generate:
4040
runs-on: ubuntu-latest
4141
steps:
42-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
43-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
42+
- uses: actions/checkout@v4
43+
- uses: actions/setup-go@v5
4444
with:
4545
go-version-file: 'go.mod'
4646
cache: true
@@ -67,12 +67,12 @@ jobs:
6767
- '1.3.*'
6868
- '1.4.*'
6969
steps:
70-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
71-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
70+
- uses: actions/checkout@v4
71+
- uses: actions/setup-go@v5
7272
with:
7373
go-version-file: 'go.mod'
7474
cache: true
75-
- uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3
75+
- uses: hashicorp/setup-terraform@v2
7676
with:
7777
terraform_version: ${{ matrix.terraform }}
7878
terraform_wrapper: false

.goreleaser.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ release:
5555
- glob: 'terraform-registry-manifest.json'
5656
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
5757
# If you want to manually examine the release before its live, uncomment this line:
58-
# draft: true
58+
draft: true
5959
changelog:
60-
skip: true
60+
use: github
61+
groups:
62+
- title: Features
63+
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
64+
order: 0
65+
- title: "Bug fixes"
66+
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
67+
order: 1
68+
- title: Others
69+
order: 999

0 commit comments

Comments
 (0)