-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (68 loc) · 1.89 KB
/
build-and-release.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Build and release the app
on:
workflow_dispatch:
push:
tags: ['[0-9]+.[0-9]+.[0-9]+']
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: 'Checkout repository'
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Get version'
run: |
echo "version=$(git describe --tag)" >> version
cat version >> $GITHUB_ENV
- name: 'Build static application'
run: |
mkdir -p './packages'
make re AIO=true && \
tar -czvf "./packages/select-static-${{env.version}}-x86_64.tar.gz" select
- name: 'Build application'
run: |
mkdir -p './packages'
make re && \
tar -czvf "./packages/select-${{env.version}}-x86_64.tar.gz" select
- name: 'Upload artifacts'
uses: 'actions/upload-artifact@v4'
with:
name: release
path: |
version
./packages/*.tar.gz
release:
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
packages: write
steps:
- name: 'Download artifact'
uses: 'actions/download-artifact@v4'
with:
name: release
path: ./
- name: 'List files'
run: |
ls -la
ls -la packages
- name: 'Get version'
run: cat version >> $GITHUB_ENV
- name: 'Create release'
uses: 'softprops/action-gh-release@v2'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{env.version}}
name: Release - ${{env.version}}
generate_release_notes: true
draft: true
prerelease: true
files: |
./packages/select-${{env.version}}-x86_64.tar.gz
./packages/select-static-${{env.version}}-x86_64.tar.gz