-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (40 loc) · 1.17 KB
/
create_release.yml
File metadata and controls
45 lines (40 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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"