forked from nblockchain/geewallet
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (79 loc) · 3.53 KB
/
CI.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
90
91
92
93
94
95
96
97
98
name: CI
on: [push, pull_request, workflow_dispatch]
# FIXME: figure out why we need to clean after make if we
# want 'make strict' target to really happen without
# assuming the binaries from previous build are good
# (msbuild bug?)
jobs:
snap_pkg:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- name: Install snap tools
run: |
sudo apt update
./scripts/install_snapcraft.sh
# hack to disable msbuild detection
# NOTE: you might think an easier way to do this would be use container:\nimage: ubuntu22.04 and then not install msbuild,
# but that doesn't work because we get the following error when trying to install snapcraft via `snap install --classic`:
# > error: cannot communicate with server: Post "http://localhost/v2/snaps/snapcraft": dial unix /run/snapd.socket: connect: no such file or directory
- name: HACK to emulate msbuild uninstall
run: sudo rm `which msbuild`
- name: Generate snap package
run: |
# retry 3 times because of flakey nuget; TODO: remove retry when we migrate to .NET6 (removing LEGACY_FRAMEWORK support)
./scripts/snap_build.sh || ./scripts/snap_build.sh || ./scripts/snap_build.sh || ./scripts/snap_build.sh
- name: Install snap
# dangerous because it's a local snap (not one from the SnapStore)
run: sudo snap install --dangerous *.snap
- name: Test snap
run: geewallet --version
- uses: actions/upload-artifact@v3
name: Upload snap package as artifact
with:
name: snap
path: ./*.snap
- name: Upload snap package to Snap Store
env:
SNAPCRAFT_LOGIN: ${{ secrets.SNAPCRAFT_LOGIN }}
run: |
sudo apt update
./scripts/snap_release.sh
snap_pkg_beta:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- name: Install snap tools
run: |
sudo apt update
./scripts/install_snapcraft.sh
# hack to disable msbuild detection
# NOTE: you might think an easier way to do this would be use container:\nimage: ubuntu22.04 and then not install msbuild,
# but that doesn't work because we get the following error when trying to install snapcraft via `snap install --classic`:
# > error: cannot communicate with server: Post "http://localhost/v2/snaps/snapcraft": dial unix /run/snapd.socket: connect: no such file or directory
- name: HACK to emulate msbuild uninstall
run: sudo rm `which msbuild`
- name: Bump snap version
run: |
git submodule foreach git fetch --all && git submodule sync --recursive && git submodule update --init --recursive
dotnet fsi ./scripts/snap_bump.fsx
- name: Generate snap package
run: |
# retry 3 times because of flakey nuget; TODO: remove retry when we migrate to .NET6 (removing LEGACY_FRAMEWORK support)
./scripts/snap_build.sh --native-segwit || ./scripts/snap_build.sh --native-segwit || ./scripts/snap_build.sh --native-segwit || ./scripts/snap_build.sh --native-segwit
- name: Install snap
# dangerous because it's a local snap (not one from the SnapStore)
run: sudo snap install --dangerous *.snap
- name: Test snap
run: geewallet --version
- uses: actions/upload-artifact@v3
name: Upload snap package as artifact
with:
name: snap_beta
path: ./*.snap
- name: Upload snap package to Snap Store
env:
SNAPCRAFT_LOGIN: ${{ secrets.SNAPCRAFT_LOGIN }}
run: |
sudo apt update
./scripts/snap_release.sh beta