Skip to content

Commit

Permalink
Set version w/ bash replacement which doens't work in workflow variables
Browse files Browse the repository at this point in the history
  • Loading branch information
rpanderson committed May 7, 2020
1 parent 8c630af commit 2fc7c5e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
env:
VERSION: ${${{ github.event.ref }}//v}
if: github.repository == 'rpanderson/workflow-sandbox'
steps:
- name: Checkout
Expand All @@ -54,6 +52,11 @@ jobs:
password: ${{ secrets.testpypi }}
repository_url: https://test.pypi.org/legacy/
# Only publish tagged merges elsewhere
- name: Get Version Number
if: github.event.ref_type == 'tag'
run: |
TAG="${GITHUB_REF/refs\/tags\/v/}" # clean tag
echo "::set-env name=VERSION::$TAG"
- name: Create GitHub Release
if: github.event.ref_type == 'tag'
id: create_release
Expand Down

0 comments on commit 2fc7c5e

Please sign in to comment.