Skip to content

Commit 8cc970b

Browse files
authored
Update release and labeler workflows (#324)
1 parent 6a193a5 commit 8cc970b

File tree

6 files changed

+89
-96
lines changed

6 files changed

+89
-96
lines changed

.github/labeler.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
enhancement:
2+
- head-branch: ['^feature/', '^feat/', '^enhancement/', '^enh/']
3+
4+
bug:
5+
- head-branch: ['^fix/', '^bug/']
6+
7+
chore:
8+
- head-branch: ['^chore/']
9+
10+
tests:
11+
- any:
12+
- head-branch: ['^tests/', '^test/']
13+
- changed-files: ['tests/**/*']
14+
- all:
15+
- changed-files: ['!tests/requirements.txt']
16+
17+
documentation:
18+
- head-branch: ['^docs/', '^doc/']
19+
- changed-files: '**/*.md'
20+
21+
dependencies:
22+
- head-branch: ['^deps/', '^dep/', '^dependabot/']
23+
- changed-files: ['go.mod', 'go.sum']

.github/release-drafter.yml

Lines changed: 0 additions & 74 deletions
This file was deleted.

.github/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- skip changelog
5+
categories:
6+
- title: 💣 Breaking Changes
7+
labels:
8+
- change
9+
- title: 🚀 Features
10+
labels:
11+
- enhancement
12+
- title: 🐛 Bug Fixes
13+
labels:
14+
- bug
15+
- title: 🧪 Tests
16+
labels:
17+
- tests
18+
- title: 🔨 Maintenance
19+
labels:
20+
- chore
21+
- title: 📝 Documentation
22+
labels:
23+
- documentation
24+
- title: ⬆️ Dependencies
25+
labels:
26+
- dependencies
27+
- title: Other Changes
28+
labels:
29+
- "*"

.github/workflows/ci.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,17 @@ jobs:
2525
steps:
2626
- name: Checkout Repository
2727
uses: actions/checkout@v3
28+
2829
- name: Setup Golang Environment
2930
uses: actions/setup-go@v4
3031
with:
3132
go-version-file: go.mod
3233
cache: true
34+
3335
- name: Determine GOPATH
3436
id: go
3537
run: echo "go_path=$(go env GOPATH)" >> $GITHUB_OUTPUT
38+
3639
- name: Build binary
3740
uses: goreleaser/goreleaser-action@v4
3841
with:
@@ -48,11 +51,13 @@ jobs:
4851
steps:
4952
- name: Checkout Repository
5053
uses: actions/checkout@v3
54+
5155
- name: Setup Golang Environment
5256
uses: actions/setup-go@v4
5357
with:
5458
go-version-file: go.mod
5559
cache: true
60+
5661
- name: Run Tests
5762
run: make test
5863

@@ -65,23 +70,32 @@ jobs:
6570
uses: actions/checkout@v3
6671
with:
6772
fetch-depth: 0
73+
6874
- name: Setup Golang Environment
6975
uses: actions/setup-go@v4
7076
with:
7177
go-version-file: go.mod
7278
cache: true
79+
7380
- name: Determine GOPATH
7481
id: go
7582
run: echo "go_path=$(go env GOPATH)" >> $GITHUB_OUTPUT
76-
- name: Publish Release Notes
77-
uses: release-drafter/release-drafter@v5
83+
84+
- name: Draft Release Notes
85+
uses: lucacome/draft-release@v0.2.0
7886
with:
79-
publish: true
80-
env:
81-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82-
if: ${{ startsWith(github.ref, 'refs/tags/') }}
87+
minor-label: 'enhancement'
88+
major-label: 'change'
89+
publish: ${{ startsWith(github.ref, 'refs/tags/') }}
90+
notes-footer: |
91+
## Resources
92+
93+
- Documentation -- https://github.com/nginxinc/nginx-asg-sync/blob/{{version}}/README.md
94+
if: github.event_name != 'pull_request'
95+
8396
- name: Download Syft
8497
uses: anchore/sbom-action/download-syft@v0.14.1
98+
8599
- name: Build binaries
86100
uses: goreleaser/goreleaser-action@v4
87101
with:

.github/workflows/labeler.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: "Pull Request Labeler"
2+
on:
3+
- pull_request_target
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
triage:
10+
permissions:
11+
contents: read
12+
pull-requests: write
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: joshdales/labeler@68a25980166b8ff8eb977d9a31cab5bd883793e1 # if https://github.com/actions/labeler/pull/203 is merged, use the official action actions/labeler
16+
with:
17+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/release-drafter.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)