Skip to content

Commit

Permalink
New github release flow
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronbrunner committed Aug 13, 2021
1 parent 3a4d25a commit 17ab99d
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ jobs:

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Get the tag name
- name: Get the version
if: startsWith(github.ref, 'refs/tags/v')
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Setup python ${{ matrix.python-version }}
Expand All @@ -32,22 +37,10 @@ jobs:
- name: Create Release
id: create_release
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/create-release@v1
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: true
- name: Upload Release Asset
id: upload-release-asset
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./prometheus/unisight-data-bridge/dist/unisight-data-bridge-2.1.0.tar.gz
asset_name: unisight-data-bridge-2.1.0.tar.gz
asset_content_type: application/tar+gz
files: ./prometheus/unisight-data-bridge/dist/unisight-data-bridge-2.1.0.tar.gz

0 comments on commit 17ab99d

Please sign in to comment.