Skip to content

Commit

Permalink
ci: setup release drafter (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayllyz committed Apr 6, 2024
1 parent 3b09f80 commit 28ace70
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 6 deletions.
45 changes: 45 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'enhancement'
- title: '🏎️ Performance'
labels:
- 'performance'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- title: '🔨 Refactor'
labels:
- 'refactor'
- title: '📚 Documentation'
labels:
- 'documentation'
- title: '🧰 Maintenance'
labels:
- 'dependencies'
- 'maintenance'
- 'ci'
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
autolabeler:
- label: 'fix'
branch:
- '/fix\/.+/'
- label: 'enhancement'
branch:
- '/feat\/.+/'
template: |
## Changelog
$CHANGES
4 changes: 2 additions & 2 deletions .github/workflows/cd-admin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: CD Admin
name: CD admin

on:
push:
Expand Down Expand Up @@ -27,7 +27,7 @@ permissions:
packages: write

jobs:
cd-admin:
admin:
name: CD Admin
runs-on: ubuntu-latest
outputs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ permissions:
packages: write

jobs:
cd-api:
api:
name: CD api
runs-on: ubuntu-latest
outputs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ permissions:
packages: write

jobs:
cd-client:
client:
name: CD client
runs-on: ubuntu-latest
outputs:
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Code quality
name: Continuous Integration

on:
push:
Expand All @@ -8,12 +8,17 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
pull-requests: read
actions: write

jobs:
quality:
ci:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
Expand All @@ -24,4 +29,12 @@ jobs:
uses: biomejs/setup-biome@v2

- name: Run Biome
id: biome
run: biome ci .

- if: ${{ github.event_name == 'pull_request' }} && failure()
name: Cancel Workflows
uses: styfle/cancel-workflow-action@0.12.1
with:
workflow_id: cd-api.yml,cd-client.yml,cd-admin.yml
access_token: ${{ github.token }}
28 changes: 28 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release Drafter

on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]
pull_request_target:
types: [opened, reopened, synchronize]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 28ace70

Please sign in to comment.