Skip to content

Merge pull request #242 from chewing/feat-robust-uninstall #207

Merge pull request #242 from chewing/feat-robust-uninstall

Merge pull request #242 from chewing/feat-robust-uninstall #207

Workflow file for this run

name: CI
env:
VER_MAJOR: 24
VER_MINOR: 10
VER_PATCH: 1
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
merge_group:
types: [checks_requested]
workflow_call:
inputs:
nightly:
description: "Update all submodules to build nightly build"
default: true
required: false
type: boolean
outputs:
unsigned-artifact-id:
description: "Unsigned Installer"
value: ${{ jobs.build.outputs.unsigned-artifact-id }}
jobs:
build:
runs-on: windows-latest
name: Build
outputs:
unsigned-artifact-id: ${{ steps.upload-unsigned.outputs.artifact-id }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Update Submodules
if: ${{ inputs.nightly }}
run: git submodule update --remote
- name: Setup rustup
run: rustup target add i686-pc-windows-msvc
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
# - name: Start SSH session
# uses: luchihoratiu/debug-via-ssh@main
# with:
# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_TOKEN }}
# SSH_PASS: ${{ secrets.SSH_PASS }}
# NGROK_REGION: jp
- name: Setup vcpkg
shell: cmd
run: |
set VCPKG_ROOT=%VCPKG_INSTALLATION_ROOT%
vcpkg install --triplet x86-windows-static sqlite3
vcpkg install --triplet x64-windows-static sqlite3
- name: Generate nightly version info
if: ${{ inputs.nightly }}
run: |
cargo xtask update-version --major $env:VER_MAJOR --minor $env:VER_MINOR --patch $env:VER_PATCH -b $env:GITHUB_RUN_NUMBER
type version.rc
type installer/version.wxi
- name: Generate pull_request version info
if: github.event_name == 'pull_request'
env:
PR_NUMBER: ${{ github.event.number }}
run: |
cargo xtask update-version --major 0 --minor 0 --patch $env:PR_NUMBER -b $env:GITHUB_RUN_NUMBER
type version.rc
type installer/version.wxi
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\vsdevcmd.bat"
set VCPKG_ROOT=%VCPKG_INSTALLATION_ROOT%
set CMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake
scripts/build_installer.bat
- id: upload-unsigned
uses: actions/upload-artifact@v4
with:
name: Unsigned Installer
path: |
dist\windows-chewing-tsf-unsigned.msi