Skip to content

catch launcher update check exceptions and treat as warning instead o… #141

catch launcher update check exceptions and treat as warning instead o…

catch launcher update check exceptions and treat as warning instead o… #141

Workflow file for this run

name: CI
on:
push:
branches:
- '**'
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
LANG: en_US.utf8
jobs:
build:
strategy:
matrix:
kind: ['linux', 'windows']
include:
- kind: linux
os: ubuntu-latest
target: linux-x64
config: Release
- kind: windows
os: windows-latest
target: win-x64
config: ReleaseWindows
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
- name: Restore
run: dotnet restore -r ${{ matrix.target }}
- name: Build
run: dotnet build -c ${{ matrix.config }} --no-restore
- name: Test
run: dotnet test -c ${{ matrix.config }} --no-build
- name: Version
id: version
shell: bash
run: |
echo "version-suffix=ci$GITHUB_RUN_ID" >> $GITHUB_OUTPUT
echo "version=$(grep -oPm1 "(?<=<VersionPrefix>)[^<]+" src/Directory.Build.props)-ci$GITHUB_RUN_ID" >> $GITHUB_OUTPUT
- name: Publish
shell: bash
run: |
target="${{ matrix.target }}"
release_name="min-ed-launcher_v${{ steps.version.outputs.version }}_$target"
dotnet publish src/MinEdLauncher/MinEdLauncher.fsproj -r "$target" --self-contained true -o "artifacts/$release_name" -c ${{ matrix.config }} -p:PublishSingleFile=true -p:VersionSuffix=${{ steps.version.outputs.version-suffix }}
- name: Install Rust
if: ${{ matrix.target == 'win-x64' }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy, rustfmt
- name: Run cargo clippy
if: ${{ matrix.target == 'win-x64' }}
run: |
cargo clippy -- -D warnings
- name: Run cargo fmt
if: ${{ matrix.target == 'win-x64' }}
run: |
cargo fmt --all -- --check
- name: Publish Bootstrap
if: ${{ matrix.target == 'win-x64' }}
shell: bash
run: |
target="${{ matrix.target }}"
release_name="min-ed-launcher_v${{ steps.version.outputs.version }}_$target"
sed -i -e 's/0\.0\.0/${{ steps.version.outputs.version }}${{ steps.version.outputs.version-suffix }}/' Cargo.toml
cargo build --release
mv target/release/bootstrap.exe "artifacts/$release_name/MinEdLauncher.Boostrap.exe"
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: min-ed-launcher_${{ steps.version.outputs.version }}_${{ matrix.target }}
path: "artifacts/*${{ matrix.target }}*/"