-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (77 loc) · 2.65 KB
/
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
83
84
85
86
87
88
89
name: Release
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
# allow next jo (appimage) to use parsed version number
outputs:
version_number: ${{ steps.parse_version_number.outputs.local_version_number }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- name: Check new Release
run: |
npx semantic-release \
--dry-run \
--plugins "@semantic-release/commit-analyzer" \
| tee semantic-release-output
- name: Parse new Release
id: parse_version_number
run: |
NEW_VERSION_NUMBER=$( \
cat semantic-release-output \
| grep "The next release version is" \
| grep -Eo "[0-9]+\.[0-9]+\.[0-9]+" \
|| echo "" \
)
echo NEW_VERSION_NUMBER=$NEW_VERSION_NUMBER
echo "::set-output name=local_version_number::$(echo $NEW_VERSION_NUMBER)"
echo NEW_VERSION_NUMBER=$NEW_VERSION_NUMBER >> $GITHUB_ENV
- name: Create new Release
if: ${{ env.NEW_VERSION_NUMBER != '' }}
run: |
npx semantic-release \
--plugins "@semantic-release/commit-analyzer" "@semantic-release/release-notes-generator" "@semantic-release/github"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
appimage:
needs: build
runs-on: ubuntu-18.04
if: ${{ needs.build.outputs.version_number != '' }}
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt update
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt update
sudo apt install build-essential
sudo apt install libncurses5-dev libncursesw5-dev
sudo apt install libcurl4-openssl-dev
sudo apt install nlohmann-json3-dev
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: cmake ..
- name: Build
working-directory: ${{github.workspace}}
run: make -C build/
- name: Download linuxdeploy
working-directory: ${{github.workspace}}
run: |
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
- name: Generate AppImage
working-directory: ${{github.workspace}}
run: |
export VERSION="v${{ needs.build.outputs.version_number }}"
./generate/generate-appimage.sh
- name: Upload AppImage-Artifact
uses: actions/upload-artifact@v2
with:
name: appimage
path: quick_clone-*.AppImage
retention-days: 2