lume/.github/workflows/main.yml

70 lines
2.2 KiB
YAML
Raw Normal View History

2023-03-28 03:51:18 +00:00
name: 'publish'
on:
push:
branches:
- release
2023-03-31 13:12:06 +00:00
env:
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: short
RUSTFLAGS: '-W unreachable-pub -W rust-2021-compatibility'
2023-03-28 03:51:18 +00:00
jobs:
publish-tauri:
strategy:
fail-fast: false
matrix:
2023-03-31 13:12:06 +00:00
settings:
- platform: 'macos-latest'
args: '--target universal-apple-darwin'
- platform: 'macos-latest'
args: '--target x86_64-apple-darwin'
- platform: 'macos-latest'
args: '--target aarch64-apple-darwin'
2023-04-01 01:20:13 +00:00
- platform: 'ubuntu-18.04'
2023-03-31 13:12:06 +00:00
args: ''
- platform: 'windows-latest'
args: '--target x86_64-pc-windows-msvc'
- platform: 'windows-latest'
args: '--target i686-pc-windows-msvc'
runs-on: ${{ matrix.settings.platform }}
2023-03-28 03:51:18 +00:00
steps:
- uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
2023-03-31 13:12:06 +00:00
node-version: 18
- uses: dtolnay/rust-toolchain@stable
2023-03-28 04:20:56 +00:00
with:
2023-03-31 13:12:06 +00:00
targets: aarch64-apple-darwin
2023-03-28 03:51:18 +00:00
- name: install dependencies (ubuntu only)
2023-04-01 01:20:13 +00:00
if: matrix.settings.platform == 'ubuntu-18.04'
2023-03-28 03:51:18 +00:00
run: |
sudo apt-get update
2023-03-31 13:12:06 +00:00
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7.x.x
run_install: false
- name: Setup node and cache for package data
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: 'pnpm'
2023-03-31 13:27:22 +00:00
cache-dependency-path: pnpm-lock.yaml
2023-03-31 13:12:06 +00:00
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
2023-03-31 13:27:22 +00:00
- run: pnpm install
2023-04-01 01:20:13 +00:00
- uses: tauri-apps/tauri-action@dev
2023-03-28 03:51:18 +00:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: 'App v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
2023-03-31 13:12:06 +00:00
args: ${{ matrix.settings.args }}