Skip to content

Commit

Permalink
run release on tag and upload asset
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeerdsen committed Dec 2, 2021
1 parent f2964c5 commit 0b17e52
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ name: release

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
tags:
- 'v*'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -28,3 +26,23 @@ jobs:
run: make venv
- name: Run a multi-line script
run: make
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
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: ./s3_trigger_goobi.zip
asset_name: s3_trigger_goobi.zip
asset_content_type: application/zip

0 comments on commit 0b17e52

Please sign in to comment.