Skip to content

Commit

Permalink
Dymanic prerelease determination
Browse files Browse the repository at this point in the history
  • Loading branch information
baileytj3 committed Dec 17, 2020
1 parent 10b864a commit 20f6bfd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Create pre-release on version tag
name: Create release on version tag

on:
push:
tags:
- 'v0.\d\.\d'
- 'v\d\.\d\.\d'

jobs:
build-and-release:
Expand All @@ -26,6 +26,12 @@ jobs:
id: release_type
run: |
tag=$(echo ${{ github.ref }} | cut -d/ -f3)
if [[ ${tag} =~ ^v0\. ]]; then
prerelease="true"
else
prerelease="false"
fi
echo "::set-output name=prerelease::$prerelease"
- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand All @@ -35,7 +41,7 @@ jobs:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: "true"
prerelease: ${{ steps.release_type.outputs.prerelease }}
- name: Upload Assets
id: upload_asset
uses: actions/upload-release-asset@v1
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='python-test',
version='0.0.8',
version='0.0.9',
author='Tyler Bailey',
packages=['python_test'],
)

0 comments on commit 20f6bfd

Please sign in to comment.