Skip to content

Commit

Permalink
Add draft release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome committed Jun 17, 2023
1 parent 9f4a140 commit e976069
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
change:
- head-branch: ['^change/']

enhancement:
- head-branch: ['^feature/', '^feat/', '^enhancement/', '^enh/']

bug:
- head-branch: ['^fix/', '^bug/']

chore:
- head-branch: ['^chore/']

documentation:
- head-branch: ['^docs/', '^doc/']
- changed-files: '**/*.md'

dependencies:
- head-branch: ['^deps/', '^dep/', '^dependabot/']
- changed-files: ['go.mod', 'go.sum']
26 changes: 26 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
changelog:
exclude:
labels:
- skip-changelog
categories:
- title: 🚀 Features
labels:
- enhancement
- title: 💣 Breaking Changes
labels:
- change
- title: 🐛 Bug Fixes
labels:
- bug
- title: 📝 Documentation
labels:
- documentation
- title: 🔨 Maintenance
labels:
- chore
- title: ⬆️ Dependencies
labels:
- dependencies
- title: Other Changes
labels:
- "*"
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
pull_request:
branches:
- main
Expand All @@ -18,6 +20,10 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

- name: Get Alpine version
id: alpine
run: echo "version=$(grep -m1 'FROM alpine' <Dockerfile | awk -F'[:]' '{print $2}')" >> $GITHUB_OUTPUT

- name: Docker Buildx
uses: docker/setup-buildx-action@ecf95283f03858871ff00b787d79c419715afc34 # v2.7.0

Expand Down Expand Up @@ -46,6 +52,7 @@ jobs:
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{version}},suffix=-alpine${{ steps.alpine.outputs.version }}
- name: Build Docker image
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
Expand Down Expand Up @@ -76,3 +83,11 @@ jobs:
uses: github/codeql-action/upload-sarif@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.13.4
with:
sarif_file: ${{ steps.scan.outputs.sarif }}

- name: Create/Update Draft
uses: lucacome/draft-release@b79be3ff634f771230b2b6ee9f47308c5793671a # v0.2.0
with:
minor-label: "enhancement"
major-label: "change"
publish: ${{ startsWith(github.ref, 'refs/tags/') }}
collapse-after: 20
17 changes: 17 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Pull Request Labeler"
on:
- pull_request_target

permissions:
contents: read

jobs:
triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-22.04
steps:
- uses: actions/labeler@4f052778de9a9b80cb16cfb9079b02287285a4cb # v5.0.0-alpha.1
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

0 comments on commit e976069

Please sign in to comment.