-
Notifications
You must be signed in to change notification settings - Fork 157
196 lines (169 loc) · 7.53 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
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
name: release
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
build_desktop:
name: Build desktop app for ${{ matrix.platform }}
strategy:
matrix:
platform: [ macos-latest, ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
env:
TAURI_PRIVATE_KEY: "${{ secrets.TAURI_PRIVATE_KEY }}"
TAURI_KEY_PASSWORD: "${{ secrets.TAURI_KEY_PASSWORD }}"
APPLE_CERTIFICATE: "${{ secrets.APPLE_CERTIFICATE }}"
APPLE_CERTIFICATE_PASSWORD: "${{ secrets.APPLE_CERTIFICATE_PASSWORD }}"
APPLE_SIGNING_IDENTITY: "${{ secrets.APPLE_SIGNING_IDENTITY }}"
APPLE_ID: "${{ secrets.APPLE_ID }}"
APPLE_PASSWORD: "${{ secrets.APPLE_PASSWORD }}"
APPLE_TEAM_ID: "${{ secrets.APPLE_TEAM_ID }}"
steps:
### system setup
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
- run: yarn
- run: rustup toolchain install stable
- name: mac > setup targets
if: matrix.platform == 'macos-latest'
run: |
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin
- name: linux > install dependencies
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 librsvg2-dev patchelf
### build apple arm
- name: mac aaarch64 > build
run: yarn tauri:build --target aarch64-apple-darwin
if: matrix.platform == 'macos-latest'
- name: mac aaarch64 > rename artifacts
if: matrix.platform == 'macos-latest'
run: |
mv src-tauri/target/aarch64-apple-darwin/release/bundle/macos/elasticvue.app.tar.gz src-tauri/target/aarch64-apple-darwin/release/bundle/macos/elasticvue_aarch64.app.tar.gz
mv src-tauri/target/aarch64-apple-darwin/release/bundle/macos/elasticvue.app.tar.gz.sig src-tauri/target/aarch64-apple-darwin/release/bundle/macos/elasticvue_aarch64.app.tar.gz.sig
- name: mac aaarch64 > upload artifacts
if: matrix.platform == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: mac_aaarch64_artifacts
if-no-files-found: error
path: |
src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/elasticvue_*_aarch64.dmg
src-tauri/target/aarch64-apple-darwin/release/bundle/macos/elasticvue_aarch64*
### build apple x86_64
- name: mac x86_64 > build
run: yarn tauri:build --target x86_64-apple-darwin
if: matrix.platform == 'macos-latest'
- name: mac x86_64 > rename artifacts
if: matrix.platform == 'macos-latest'
run: |
mv src-tauri/target/x86_64-apple-darwin/release/bundle/macos/elasticvue.app.tar.gz src-tauri/target/x86_64-apple-darwin/release/bundle/macos/elasticvue_x64.app.tar.gz
mv src-tauri/target/x86_64-apple-darwin/release/bundle/macos/elasticvue.app.tar.gz.sig src-tauri/target/x86_64-apple-darwin/release/bundle/macos/elasticvue_x64.app.tar.gz.sig
- name: mac x86_64 > upload artifacts
if: matrix.platform == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: mac_x86_64_artifacts
if-no-files-found: error
path: |
src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/elasticvue_*_x64.dmg
src-tauri/target/x86_64-apple-darwin/release/bundle/macos/elasticvue_x64*
### build linux
- name: linux > build
run: yarn tauri:build
if: matrix.platform == 'ubuntu-latest'
- name: linux > upload artifacts
if: matrix.platform == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: linux_artifacts
if-no-files-found: error
path: |
src-tauri/target/release/bundle/deb/elasticvue_*_amd64.deb
src-tauri/target/release/bundle/appimage/elasticvue_*_amd64.*
src-tauri/target/release/elasticvue
### build windows
- name: windows > build
run: yarn tauri:build
if: matrix.platform == 'windows-latest'
- name: windows > upload artifacts
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: windows_artifacts
if-no-files-found: error
path: |
src-tauri/target/release/bundle/msi/elasticvue_*_x64*
src-tauri/target/release/elasticvue.exe
# build_docker:
# name: Build docker images
# runs-on: ubuntu-latest
# steps:
# - name: Docker hub login
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
#
# - uses: actions/checkout@v4
#
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
#
# - name: Set up Docker buildx
# uses: docker/setup-buildx-action@v3
#
# - uses: martinbeentjes/[email protected]
# id: package-version
#
# - name: Build and push
# uses: docker/build-push-action@v5
# with:
# context: .
# platforms: linux/amd64,linux/arm64,linux/arm/v7
# file: docker/Dockerfile_multiarch
# push: true
# tags: cars10/elasticvue:latest,cars10/elasticvue:${{ steps.package-version.outputs.current-version }}
# #tags: cars10/elasticvue:${{ steps.package-version.outputs.current-version }}
publish:
name: Publish release
needs:
- build_desktop
#- build_docker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: martinbeentjes/[email protected]
id: package-version
- uses: actions/download-artifact@v4
with:
path: github-artifacts
- uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
prerelease: false
tag: ${{ github.ref_name }}
name: ${{ github.ref_name }}
artifacts: github-artifacts/*/*
body: |
## Using elasticvue
### Desktop app
* [Windows .msi](https://github.com/cars10/elasticvue/releases/download/${{ github.ref_name }}/elasticvue_${{ steps.package-version.outputs.current-version }}_x64_en-US.msi)
* [Mac x68 .dmg](https://github.com/cars10/elasticvue/releases/download/${{ github.ref_name }}/elasticvue_${{ steps.package-version.outputs.current-version }}_x64.dmg) / [Mac aarch64 .dmg](https://github.com/cars10/elasticvue/releases/download/${{ github.ref_name }}/elasticvue_${{ steps.package-version.outputs.current-version }}_aarch64.dmg)
* [Linux .AppImage](https://github.com/cars10/elasticvue/releases/download/${{ github.ref_name }}/elasticvue_${{ steps.package-version.outputs.current-version }}_amd64.AppImage) / [Linux .deb](https://github.com/cars10/elasticvue/releases/download/${{ github.ref_name }}/elasticvue_${{ steps.package-version.outputs.current-version }}_amd64.deb)
### Browser extension
* [Google Chrome](https://chrome.google.com/webstore/detail/elasticvue/hkedbapjpblbodpgbajblpnlpenaebaa)
* [Mozilla Firefox](https://addons.mozilla.org/en-US/firefox/addon/elasticvue/)
* [Microsoft Edge](https://microsoftedge.microsoft.com/addons/detail/elasticvue/geifniocjfnfilcbeloeidajlfmhdlgo)
### Other
* [Docker](https://hub.docker.com/r/cars10/elasticvue)
* [Hosted](https://app.elasticvue.com)