Skip to content

Commit

Permalink
Merge pull request #8 from techman83/improve_releases
Browse files Browse the repository at this point in the history
Improve Releases
  • Loading branch information
techman83 authored Apr 29, 2021
2 parents 71ec36f + dd1ad74 commit 28ad5df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 28 deletions.
35 changes: 8 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,21 @@
---
name: Release Version

on:
push:
branches:
- main
paths:
- filament_scale_enhanced/fse_version.py
tags:
- "v*"

jobs:
tag:
generate-release:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.output_version.outputs.version }}
steps:
- uses: actions/checkout@v2
- name: collect_tag_version
- name: Set package version
run: |
echo VERSION=$(cat filament_scale_enhanced/fse_version.py | awk '{ print $3 }' | sed 's/"//g') >> $GITHUB_ENV
- name: Push tag
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ env.VERSION }}
tag_prefix: v
- name: Output Version
id: output_version
run: echo "::set-output name=version::${{ env.VERSION }}"

release:
runs-on: ubuntu-latest
needs: tag
steps:
- uses: actions/checkout@v2
with:
ref: "v${{ needs.tag.outputs.version }}"
export VERSION=$(echo $GITHUB_REF | sed 's/refs\/tags\/v//')
echo "VERSION set to $VERSION"
echo VERSION = \'$VERSION\' > filament_scale_enhanced/fse_version.py
- name: Setup Python
uses: actions/setup-python@v2
with:
Expand All @@ -53,7 +35,6 @@ jobs:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
draft: false
automatic_release_tag: "v${{ needs.tag.outputs.version }}"
files: |
LICENSE.txt
dist/Filament_Scale_Enhanced.zip
2 changes: 1 addition & 1 deletion filament_scale_enhanced/fse_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "0.2.7"
VERSION = "0.0.0"

0 comments on commit 28ad5df

Please sign in to comment.