-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 1.82 KB
/
Copy pathbuild_linux.yml
File metadata and controls
62 lines (52 loc) · 1.82 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Build Linux
on:
push:
branches:
- 'main'
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Determine VERSION
run: |
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
VERSION="${GITHUB_REF#refs/tags/}"
else
VERSION=$(git describe --tags "$(git rev-list --tags --max-count=1)")
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies
run: npm install
- name: Install Snapcraft
run: |
sudo apt-get update
sudo apt-get install snapd
sudo snap install snapcraft --classic
- name: Build Electron app
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
SCIEBO_ACCESS_TOKEN: ${{ secrets.NEXTCLOUD_SCIEBO_PASSWORD }}
NEXTCLOUD_SCIEBO_SHARE: ${{ secrets.NEXTCLOUD_SCIEBO_SHARE }}
run: |
npm run build-linux --loglevel verbose
- name: Upload Artifacts
if: success()
env:
SCIEBO_ACCESS_TOKEN: ${{ secrets.NEXTCLOUD_SCIEBO_PASSWORD }}
NEXTCLOUD_SCIEBO_SHARE: ${{ secrets.NEXTCLOUD_SCIEBO_SHARE }}
run: |
curl -v -u "$NEXTCLOUD_SCIEBO_SHARE:$SCIEBO_ACCESS_TOKEN" -T dist/Shiny-Calorie-$VERSION.AppImage https://uni-bonn.sciebo.de/public.php/webdav/Shiny-Calorie-$VERSION-amd64.AppImage
curl -v -u "$NEXTCLOUD_SCIEBO_SHARE:$SCIEBO_ACCESS_TOKEN" -T dist/shiny-calorie-app_${VERSION}_amd64.snap https://uni-bonn.sciebo.de/public.php/webdav/Shiny-Calorie-$VERSION-amd64.snap