Skip to content

Commit

Permalink
Added release-drafter workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaliyf committed Sep 16, 2024
1 parent ca00683 commit fc8db62
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: Draft Release

on:
push:
branches: [ main ]

jobs:
next-release:
permissions:
contents: write
pull-requests: read
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Generate next version
id: calver
run: |
today=$(date +%Y%m%d)
release=1
while [ ! -z $(git tag -l ${today}.${release}) ]; do
release=$((release+1))
done
next_version="${today}.${release}"
echo "version=${next_version}" >> $GITHUB_OUTPUT
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter.yml
disable-autolabeler: true
name: ${{ steps.calver.outputs.version }}
tag: ${{ steps.calver.outputs.version }}
version: ${{ steps.calver.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit fc8db62

Please sign in to comment.