forked from authpass/authpass
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (73 loc) · 2.72 KB
/
linux.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
name: build linux
on:
push:
branches:
- 'linux**'
- 'stable'
- 'beta'
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
flavor: ['linux']
fail-fast: true
steps:
- uses: actions/checkout@v3
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Postdeploy
env:
BLACKBOX_SECRET: ${{ secrets.BLACKBOX_SECRET_KEY }}
run: authpass/_tools/postdeploy.sh
- run: |
sudo apt-get update
sudo apt-get install -y \
clang \
cmake \
ninja-build \
file pkg-config git unzip \
libgtk-3-dev libx11-dev \
libsecret-1-dev \
keybinder-3.0
- name: ci-install-deps
run: "./authpass/_tools/ci-install-deps.sh linux"
# - run: ~/deps/flutter/bin/flutter channel master && ~/deps/flutter/bin/flutter upgrade && ~/deps/flutter/bin/flutter config --enable-linux-desktop
- run: ~/deps/flutter/bin/flutter config --enable-linux-desktop
- name: build ${{ matrix.flavor }} apk
id: buildapk
env:
GIT_AUTHOR_NAME: 'Github Action CI'
GIT_AUTHOR_EMAIL: '[email protected]'
GIT_COMMITTER_NAME: 'Github Action CI'
GIT_COMMITTER_EMAIL: '[email protected]'
run: "./authpass/_tools/ci-release.sh ${{ matrix.flavor }}"
- uses: actions/upload-artifact@v3
with:
name: ${{ steps.buildapk.outputs.outputfilename }}
path: authpass/${{ steps.buildapk.outputs.outputpath }}
- name: upload artifact
run: ./authpass/_tools/upload-artifact.sh authpass/${{ steps.buildapk.outputs.outputpath }}
- uses: snapcore/action-build@v1
id: snapcraft
- name: upload snap artifact
run: |
curl --request POST \
--url https://data.authpass.app/data/artifact.push \
--fail \
--form token=$( cat authpass/_tools/secrets/artifact_token.txt ) \
--form upload=@${{ steps.snapcraft.outputs.snap }} \
--form filename=authpass_${{ steps.buildapk.outputs.appversion }}_${{ steps.buildapk.outputs.appbuildnumber }}_amd64.snap
- uses: snapcore/action-publish@v1
with:
store_login: ${{ secrets.SNAPCRAFT_TOKEN }}
snap: ${{ steps.snapcraft.outputs.snap }}
release: edge
- uses: actions/upload-artifact@v3
with:
name: authpass-${{ steps.buildapk.outputs.appversion }}_${{ steps.buildapk.outputs.appbuildnumber }}-snap
path: ${{ steps.snapcraft.outputs.snap }}