Release #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: tag name | |
push: | |
tags: | |
- v*.*.* | |
jobs: | |
release: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: 'ubuntu-20.04' | |
target: x86_64-unknown-linux-gnu | |
- os: 'windows-latest' | |
target: x86_64-pc-windows-msvc | |
target-gnu: x86_64-pc-windows-gnu | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: install Rust toolchain | |
run: rustup toolchain install stable --profile minimal --no-self-update | |
- name: install dependencies (ubuntu only) | |
if: matrix.os == 'ubuntu-20.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | |
- name: configure cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
resources/packages/ | |
target/ | |
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | |
- name: install cargo-tauri-cli | |
run: cargo install tauri-cli --version "^1" | |
- name: dist | |
run: | | |
cargo dev vendor | |
cargo dev dist | |
- name: prepare packages (windows) | |
if: matrix.os == 'windows-latest' | |
shell: bash | |
run: | | |
set -x | |
export LANG=C.UTF-8 | |
NAME=$(grep -Po 'vendor_en": "\K[^"]*' locales/en.json) | |
mkdir ./dist/binaries/ | |
mv ./dist/${{ matrix.target-gnu }}/$NAME-installer.exe ./dist/binaries/$NAME-installer-${{ matrix.target-gnu }}.exe | |
mv ./dist/${{ matrix.target }}/$NAME-installer.exe ./dist/binaries/$NAME-installer-${{ matrix.target }}.exe | |
cd ./dist/${{ matrix.target-gnu }} | |
rm -f $NAME-${{ matrix.target-gnu }}/$NAME-installer-cli.exe | |
7z a ../binaries/$NAME-${{ matrix.target-gnu }}.zip $NAME-${{ matrix.target-gnu }} | |
cd ../${{ matrix.target }} | |
rm -f $NAME-${{ matrix.target }}/$NAME-installer-cli.exe | |
7z a ../binaries/$NAME-${{ matrix.target }}.zip $NAME-${{ matrix.target }} | |
- name: prepare packages (unix) | |
if: matrix.os != 'windows-latest' | |
run: | | |
set -x | |
NAME=$(grep -Po 'vendor_en": "\K[^"]*' locales/en.json) | |
mkdir ./dist/binaries/ | |
mv ./dist/${{ matrix.target }}/$NAME-installer-cli ./dist/binaries/$NAME-installer-cli-${{ matrix.target }} | |
mv ./dist/${{ matrix.target }}/$NAME-installer ./dist/binaries/$NAME-installer-${{ matrix.target }} | |
cd ../${{ matrix.target }} | |
tar cjf ../binaries/$NAME-${{ matrix.target }}.tar.xz $NAME-${{ matrix.target }} | |
- name: upload release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
generateReleaseNotes: true | |
artifacts: "./dist/binaries/*" |