Skip to content

Commit

Permalink
Add step to create release draft and upload zip (#432)
Browse files Browse the repository at this point in the history
* 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`
  • Loading branch information
GeckoEidechse authored Mar 7, 2023
1 parent c6c55ff commit 8d7b5e4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8d7b5e4

Please sign in to comment.