-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Github action to create prereleases from tags.
- Loading branch information
Showing
2 changed files
with
52 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
# Copyright 2022 Lukas <lumip> Prediger | ||
|
||
name: Create Pre-Release | ||
|
||
on: | ||
push: | ||
tags: [ '*' ] | ||
|
||
jobs: | ||
build-binaries: | ||
uses: ./.github/workflows/build_binaries.yml | ||
|
||
create-release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
needs: | ||
- build-binaries | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
path: binaries | ||
- name: Bundle ZIPs | ||
run: | | ||
cd binaries | ||
zip -r fsmodm-cli.zip fsmodm-cli | ||
zip -r fsmodm-gui.zip fsmodm-gui | ||
- name: Publish Pre-Release | ||
if: startsWith(github.ref, 'refs/tags/') | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
TAG_NAME=${GITHUB_REF##refs/tags/} | ||
echo "Version: ${VERSION}" | ||
echo "Ref: ${GITHUB_REF}" | ||
echo "Tag: ${TAG_NAME}" | ||
assets=() | ||
for asset in $(find wheels -type f); do | ||
echo "Adding asset: ${asset}" | ||
assets+=("-a" "$asset") | ||
done | ||
hub release create -p -a binaries/fsmodm-cli.zip -a binaries/fsmodm-gui.zip -m "$TAG_NAME" "$TAG_NAME" |