Skip to content

Order master mod list and support filtering #20

Order master mod list and support filtering

Order master mod list and support filtering #20

Workflow file for this run

name: Publish
on:
push:
tags:
- "v*"
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
permissions: write-all
outputs:
release: ${{ steps.release.outputs.upload_url }}
version: ${{ steps.version.outputs.version-without-v }}
steps:
- name: Get Version
uses: battila7/[email protected]
id: version
- name: Create Release
uses: actions/create-release@v1
id: release
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
with:
tag_name: ${{ steps.version.outputs.version }}
release_name: TotK Mod Manager - ${{ steps.version.outputs.version }}
# prerelease: ${{ contains(steps.version.outputs.version, 'alpha') || contains(steps.version.outputs.version, 'beta') || contains(steps.version.outputs.version, 'rc') }}
build:
needs: release
permissions: write-all
name: ${{ matrix.target.name }} on ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: true
matrix:
target:
- project: Tkmm.Desktop
name: TKMM
exe: tkmm
- project: Tkmm.Launcher
name: TKMM-Launcher
exe: tkmm-launcher
config:
- name: Windows (x64)
os: ubuntu-latest
runtime: win-x64
extension: .exe
- name: Windows (arm64)
os: ubuntu-latest
runtime: win-arm64
extension: .exe
- name: Linux (x64)
os: ubuntu-latest
runtime: linux-x64
extension: ~
- name: Linux (arm64)
os: ubuntu-latest
runtime: linux-arm64
extension: ~
- name: MacOS (x64)
os: ubuntu-latest
runtime: osx-x64
extension: ~
- name: MacOS (arm64)
os: ubuntu-latest
runtime: osx-arm64
extension: ~
steps:
- name: Checkout
uses: actions/[email protected]
with:
submodules: true
- name: Setup .NET SDK
uses: actions/[email protected]
with:
dotnet-version: "8.0.x"
- name: Build
shell: bash
run: |
dotnet publish src/${{ matrix.target.project }} \
-c Release \
-o ${{ matrix.target.name }}-${{ matrix.config.runtime }} \
-r ${{ matrix.config.runtime }} \
--sc false \
--version-suffix ${{ needs.release.outputs.version }} \
-p:DebugType=embedded \
-p:IncludeNativeLibrariesForSelfExtract=true \
-p:PublishSingleFile=true \
-p:Version=${{ needs.release.outputs.version }}
- name: Rename Executable
shell: bash
run: |-
mv \
${{ matrix.target.name }}-${{ matrix.config.runtime }}/${{ matrix.target.project }}${{ matrix.config.extension }} \
${{ matrix.target.name }}-${{ matrix.config.runtime }}/${{ matrix.target.exe }}${{ matrix.config.extension }} \
- name: Archive Build
uses: TheDoctor0/[email protected]
with:
type: zip
filename: ../${{ matrix.target.name }}-${{ matrix.config.runtime }}.zip
directory: ${{ matrix.target.name }}-${{ matrix.config.runtime }}
path: ./**
- name: Upload Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
with:
upload_url: ${{ needs.release.outputs.release }}
asset_path: ${{ matrix.target.name }}-${{ matrix.config.runtime }}.zip
asset_name: ${{ matrix.target.name }}-${{ matrix.config.runtime }}.zip
asset_content_type: application/zip