Skip to content

Commit

Permalink
[CI] Create github release automatically
Browse files Browse the repository at this point in the history
Apparently it is the way to go

Change-Id: I3d443138e7d6ea4e9b190e8f120ae71e7e346cc8
  • Loading branch information
kamaradclimber committed Jun 11, 2021
1 parent 963fd79 commit ad5ea8e
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: PostSubmit
on:
release:
types: [published]
on: push
jobs:
publish:
name: Publish
Expand All @@ -21,19 +19,19 @@ jobs:
run: npm run dist
- name: Get the version
id: get_version
if: startsWith(github.ref, 'refs/tags/')
run: echo ::set-output name=TAG::${GITHUB_REF#refs/tags/}
- name: prepare deploy
if: startsWith(github.ref, 'refs/tags/')
run: cd dist && zip -r marathon-ui-${TAG}.zip .
env:
TAG: ${{ steps.get_version.outputs.TAG }}
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
- name: Create release
id: upload-release-asset
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
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: dist/marathon-ui-${{ steps.get_version.outputs.TAG }}.zip
asset_name: marathon-ui-${{ steps.get_version.outputs.TAG }}.zip
asset_content_type: application/zip
files: dist/marathon-ui-${{ steps.get_version.outputs.TAG }}.zip

0 comments on commit ad5ea8e

Please sign in to comment.