Skip to content

Commit

Permalink
Create release.yaml
Browse files Browse the repository at this point in the history
automatic package release, closes #30
  • Loading branch information
mlinmg authored Dec 9, 2024
1 parent 984c526 commit c357a1e
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Create Release on Version Change

on:
push:
branches:
- main
paths:
- 'setup.py'

jobs:
check-and-create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2 # to check against previus releases

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Extract Version
id: get_version
run: |
VERSION=$(python setup.py --version)
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.get_version.outputs.version }}
release_name: Release v${{ steps.get_version.outputs.version }}
draft: false
prerelease: false

0 comments on commit c357a1e

Please sign in to comment.