Build and Release Desktop Client #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: Build and Release Desktop Client | |
on: | |
workflow_dispatch: | |
inputs: | |
serverip: | |
default: '0.0.0.0:4000' | |
required: false | |
type: string | |
description: 'Server IP (with port) for RCS CTF API Server' | |
release_version: | |
default: '0.0.0-dev' | |
required: false | |
type: string | |
description: 'Release version for the client' | |
release_name: | |
default: 'local-development' | |
required: false | |
type: string | |
description: 'Release name for the client' | |
is_pre_release: | |
default: true | |
required: false | |
type: boolean | |
description: 'Is this a pre-release?' | |
draft_release: | |
default: true | |
required: false | |
type: boolean | |
description: 'Do you want to draft?' | |
permissions: | |
issues: write | |
repository-projects: read | |
contents: write | |
jobs: | |
buildapp: | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [macos-latest, ubuntu-20.04, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Setup Environment | |
uses: ./.github/actions/setup | |
- name: Copy before build | |
run: | | |
cd packages/deployer-url | |
node entrypoint.js ${{ github.event.inputs.serverip }} | |
- name: Build | |
run: pnpm build:client | |
- name: Copy before release | |
run: | | |
bash ./scripts/build-client.sh | |
- name: install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: install dependencies (ubuntu only) | |
if: matrix.platform == 'ubuntu-20.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | |
- uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tagName: ${{ github.event.inputs.release_name }}-v${{ github.event.inputs.release_version }} # the action automatically replaces \_\_VERSION\_\_ with the app version | |
releaseName: '${{ github.event.inputs.release_name }} v${{ github.event.inputs.release_version }}' | |
releaseBody: 'See the assets to download this version and install.' | |
releaseDraft: ${{ github.event.inputs.draft_release }} | |
prerelease: ${{ github.event.inputs.is_pre_release }} | |
projectPath: apps/desktop/src-tauri | |
distPath: apps/desktop/dist |