-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (58 loc) · 1.9 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: release
on:
push:
branches: [ master ]
paths: [ CHANGELOG.md ]
jobs:
changelog-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.latest.outputs.output }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get the latest version
id: latest
uses: miniscruff/changie-action@6dcc2533cac0495148ed4046c438487e4dceaa23 # v2.0.0
with:
version: latest
args: latest
release-tag:
needs: [changelog-version]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Push release tag
run: |
git tag "${{ needs.changelog-version.outputs.version }}"
git push origin "${{ needs.changelog-version.outputs.version }}"
release-notes:
needs: [ changelog-version, release-tag ]
runs-on: ubuntu-latest
steps:
# Checkout the tag we just released
- uses: actions/checkout@v4
with:
ref: ${{ needs.changelog-version.outputs.version }}
fetch-depth: 0
- name: Generate Release Notes
# sed command removes the version+date header
run: |
cd .changes
sed -e "1{/# /d;}" -e "2{/^$/d;}" ${{ needs.changelog-version.outputs.version }}.md > release-notes.txt
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: release-notes
path: ./.changes/release-notes.txt
retention-days: 1
terraform-provider-release:
name: 'Terraform Provider Release'
needs: [release-notes]
uses: hashicorp/ghaction-terraform-provider-release/.github/workflows/community.yml@9b5d2ca4b85f3a54d5c4d12e7690ddad1526ff6c # v3.0.1
secrets:
gpg-private-key: '${{ secrets.GPG_PRIVATE_KEY }}'
gpg-private-key-passphrase: '${{ secrets.GPG_PASSPHRASE }}'
with:
release-notes: true
setup-go-version-file: 'go.mod'