-
Notifications
You must be signed in to change notification settings - Fork 0
158 lines (131 loc) · 4.98 KB
/
publish.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
name: Publish
on:
push:
branches:
- ci # main
tags:
- "*"
env:
CARGO_TERM_COLOR: always
jobs:
upload_license:
name: Upload License
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/upload-artifact@v3
with:
name: LICENSE
path: LICENSE
build:
name: Build - ${{ matrix.platform }}
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [macos-latest, windows-latest] # ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
shared-key: whooosh-${{ matrix.platform }}
workspaces: src-tauri
- uses: volta-cli/action@v4
- uses: dtolnay/rust-toolchain@stable
- if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install libwebkit2gtk-4.0-dev \
build-essential \
curl \
wget \
file \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev
- run: yarn install --immutable
- run: yarn tauri build --ci
- uses: actions/upload-artifact@v4
with:
name: artifact
path: src-tauri/target/release/bundle
retention-days: 7
upload_to_release:
needs: [build, upload_license]
name: Publish binaries
runs-on: ubuntu-latest
# if: ${{ github.ref_type == 'tag' }}
steps:
- uses: actions/download-artifact@v4
with:
path: ~/
merge-multiple: true
- run: ls -R
- name: Copy artifacts to archive
run: |
mkdir ups-and-downs.app
cp -r /home/runner/artifact/bundle/macos/ups-and-downs.app ups-and-downs.app
chmod +x -R ups-and-downs.app
cp -r /home/runner/artifact/LICENSE/LICENSE ups-and-downs.app/
tar -czf ups-and-downs.app.tar.gz ups-and-downs.app/*
mkdir ups-and-downs.dmg
cp -r /home/runner/artifact/bundle/dmg ups-and-downs.dmg
chmod +x -R ups-and-downs.dmg
cp -r /home/runner/artifact/LICENSE/LICENSE ups-and-downs.dmg/
tar -czf ups-and-downs.dmg.tar.gz ups-and-downs.dmg/*
mkdir ups-and-downs.deb
cp -r /home/runner/artifact/bundle/deb ups-and-downs.deb
chmod +x -R ups-and-downs.deb
cp -r /home/runner/artifact/LICENSE/LICENSE ups-and-downs.deb/
tar -czf ups-and-downs.deb.tar.gz ups-and-downs.deb/*
mkdir ups-and-downs.appimage
cp -r /home/runner/artifact/bundle/appimage ups-and-downs.appimage
chmod +x -R ups-and-downs.appimage
cp -r /home/runner/artifact/LICENSE/LICENSE ups-and-downs.appimage/
tar -czf ups-and-downs.appimage.tar.gz ups-and-downs.appimage/*
mkdir ups-and-downs.nsis
cp -r /home/runner/artifact/bundle/nsis ups-and-downs.nsis
chmod +x -R ups-and-downs.nsis
cp -r /home/runner/artifact/LICENSE/LICENSE ups-and-downs.nsis/
tar -czf ups-and-downs.nsis.tar.gz ups-and-downs.nsis/*
mkdir ups-and-downs.msi
cp -r /home/runner/artifact/bundle/msi ups-and-downs.msi
chmod +x -R ups-and-downs.msi
cp -r /home/runner/artifact/LICENSE/LICENSE ups-and-downs.msi/
tar -czf ups-and-downs.msi.tar.gz ups-and-downs.msi/*
- uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ups-and-downs.app.tar.gz
tag: ${{ github.ref_name }}
asset_name: ups-and-downs-${{ github.ref_name }}.app.tar.gz
- uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ups-and-downs.dmg.tar.gz
tag: ${{ github.ref_name }}
asset_name: ups-and-downs-${{ github.ref_name }}.dmg.tar.gz
- uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ups-and-downs.deb.tar.gz
tag: ${{ github.ref_name }}
asset_name: ups-and-downs-${{ github.ref_name }}.deb.tar.gz
- uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ups-and-downs.appimage.tar.gz
tag: ${{ github.ref_name }}
asset_name: ups-and-downs-${{ github.ref_name }}.appimage.tar.gz
- uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ups-and-downs.nsis.tar.gz
tag: ${{ github.ref_name }}
asset_name: ups-and-downs-${{ github.ref_name }}.nsis.tar.gz
- uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ups-and-downs.msi.tar.gz
tag: ${{ github.ref_name }}
asset_name: ups-and-downs-${{ github.ref_name }}.msi.tar.gz