Add step to create release draft and upload zip (#432)

* Add step to create release draft and upload zip

* Skip draft creation for release candidates

* Zip folder before upload and give permission

The action we use can only deal with single files, not folders

* Use `env.NORTHSTAR_VERSION`

* Check if tags start with `v`
This commit is contained in:
GeckoEidechse 2023-03-07 21:34:17 +01:00 committed by GitHub
parent c6c55ff014
commit 8d7b5e4515
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -10,6 +10,9 @@ on:
required: true
default: 'build-thunderstore-package'
permissions:
contents: write # Needed to write to GitHub draft release
env:
NORTHSTAR_VERSION: ${{ github.ref_name }}
@ -130,6 +133,17 @@ jobs:
with:
name: Northstar.release.${{ env.NORTHSTAR_VERSION }}
path: northstar
- name: Create zip to upload
run: |
cd northstar/
zip --recurse-paths --quiet Northstar.release.${{ env.NORTHSTAR_VERSION }}.zip .
mv Northstar.release.${{ env.NORTHSTAR_VERSION }}.zip ../
- name: Upload zip to release draft
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v') && !contains(env.NORTHSTAR_VERSION, '-rc')
with:
draft: true
files: Northstar.release.${{ env.NORTHSTAR_VERSION }}.zip
build-thunderstore-package:
needs: build-northstar # comment out when running locally