-
-
Notifications
You must be signed in to change notification settings - Fork 1
121 lines (108 loc) · 4.54 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
name: Create release
on:
push:
branches:
- release
jobs:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
settings:
- platform: 'macos-latest' # for Arm based macs (M1 and above).
args: '--target aarch64-apple-darwin'
src: 'target/aarch64-apple-darwin/release/bundle/dmg/reaboot_*_aarch64.dmg'
dest: 'reaboot-arm64.dmg'
- platform: 'macos-latest' # for Intel based macs.
args: '--target x86_64-apple-darwin'
src: 'target/x86_64-apple-darwin/release/bundle/dmg/reaboot_*_x64.dmg'
dest: 'reaboot-x86_64.dmg'
- platform: 'windows-latest'
args: '--bundles none'
src: 'target/release/reaboot.exe'
dest: 'reaboot-x64.exe'
- platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04.
args: '--bundles deb'
src: 'target/release/bundle/deb/reaboot_*_amd64.deb'
dest: 'reaboot-x86_64.deb'
runs-on: ${{ matrix.settings.platform }}
steps:
- uses: actions/checkout@v4
- name: install dependencies (ubuntu only)
if: matrix.settings.platform == 'ubuntu-22.04' # This must match the platform value defined above.
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'npm'
cache-dependency-path: gui/package-lock.json
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
targets: ${{ matrix.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: Rust cache
uses: swatinem/rust-cache@v2
- name: install frontend dependencies
working-directory: gui
run: npm install
- name: Build
working-directory: gui
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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 }}
run: npm run tauri build -- ${{ matrix.settings.args }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.settings.dest }}
path: ${{ matrix.settings.src }}
#
# - name: Create Release
# uses: actions/github-script@v4
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# script: |
# const { data } = await github.repos.createRelease({
# owner: context.repo.owner,
# repo: context.repo.repo,
# tag_name: 'v1.0.0', // Specify your tag name here
# name: 'Version 1.0.0 Release', // Specify your release name here
# body: 'Release notes for version 1.0.0', // Specify your release notes here
# draft: false, // Change to true if you want to create a draft release
# prerelease: false // Change to true if this is a pre-release
# });
# console.log('Created release:', data.html_url);
- name: List dir
shell: bash
run: ls -al
# - name: Create release
# shell: bash
# env:
# GITHUB_TOKEN: ${{ github.TOKEN }}
# run: |
# gh release create --draft --prerelease --target v0.0.0 *
# - uses: tauri-apps/tauri-action@v0
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# 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 }}
# with:
# projectPath: gui
# args: ${{ matrix.settings.args }}
# tagName: v__VERSION__
# releaseName: 'v__VERSION__'