-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (72 loc) · 2.28 KB
/
binary-build.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
name: Binary build
on:
- push
- pull_request_target
jobs:
publish-tauri:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true
- name: Build static
shell: bash
id: build-static
run: |
export NEXT_PUBLIC_SUPABASE_URL=${{ secrets.SUPABASE_URL }}
export NEXT_PUBLIC_SUPABSE_PUBLIC_ANON_KEY=${{ secrets.SUPABASE_PUBLIC_ANON_KEY }}
pnpm run build
pnpm run export
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: install Rust nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: install webkit2gtk (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- name: Output auto relase tag
id: auto-release-tag
shell: bash
run: |
unset BRANCH_NAME
BRANCH_NAME=`git branch --show-current`
echo "BRANCH_NAME: $BRANCH_NAME"
SHA_TAG=`echo $GITHUB_SHA | head -c 7`
echo "SHA_TAG: $SHA_TAG"
echo ::set-output name=RELEASE_TAG::${BRANCH_NAME}-${SHA_TAG}
- name: Build binary
uses: tauri-apps/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: ${{ steps.auto-release-tag.outputs.RELEASE_TAG }}
releaseName: plastic-editor auto release ${{ steps.auto-release-tag.outputs.RELEASE_TAG }}
releaseDraft: true
prerelease: true