Skip to content

Commit

Permalink
chore(ci): add release drafter workflow (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
hrzlgnm authored Oct 18, 2024
1 parent 464e2e5 commit 912ad82
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release Drafter

on:
push:
branches:
- main

jobs:
update_release_draft:
runs-on: ubuntu-latest
name: Release Drafter
steps:
- name: Checkout the repository
uses: actions/checkout@v4.2.1
with:
fetch-depth: 0

- name: Find Next Version
id: version
run: |
tag_prefix="mdns-browser-"
current_version=$(jq -r '.version' src-tauri/tauri.conf.json)
IFS='.' read -r -a version_parts <<< "$current_version"
major=${version_parts[0]}
minor=${version_parts[1]}
patch=${version_parts[2]}
new_patch=$((patch + 1))
new_version="v$major.$minor.$new_patch"
echo Current version: v$current_version
echo New target version: $new_version
echo "tag=$tag_prefix-$new_version" >> "$GITHUB_OUTPUT"
echo "name=mDNS-Browser Release v$new_version" >> "$GITHUB_OUTPUT"
- name: Run Release Drafter
uses: release-drafter/release-drafter@v6.0.0
with:
tag: ${{ steps.version.outputs.tag }}
name: ${{ steps.version.outputs.name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 912ad82

Please sign in to comment.