Skip to content
This repository has been archived by the owner on Dec 14, 2024. It is now read-only.

fix-installer(pre-release): 1.3.6-pre #78

fix-installer(pre-release): 1.3.6-pre

fix-installer(pre-release): 1.3.6-pre #78

Workflow file for this run

name: PSP Papers Mod Installer
on:
push:
paths:
- psp-papers-installer/**
- .github/workflows/win-installer.yml
branches: [ "main" ]
pull_request:
paths:
- psp-papers-installer/**
- .github/workflows/win-installer.yml
branches: [ "main" ]
jobs:
build:
strategy:
matrix:
configuration: [Release]
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- name: Build installer executable
run: |
dotnet restore "psp-papers-installer\psp-papers-installer.csproj"
dotnet publish "psp-papers-installer\psp-papers-installer.csproj" -r win-x64 -c $env:Configuration /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --self-contained=false
env:
Configuration: ${{ matrix.configuration }}
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: PspPapersModInstaller
path: .\psp-papers-installer\bin\Release\net8.0-windows\win-x64\publish\psp_papers_installer.exe
create_release:
permissions:
contents: write
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && (contains(github.event.head_commit.message, 'installer(release):') || contains(github.event.head_commit.message, 'installer(pre-release):'))
steps:
- name: Get release version
run: |
COMMIT_MESSAGE="${{ github.event.head_commit.message }}"
RELEASE_NAME=$(echo "$COMMIT_MESSAGE" | sed -E 's/.*installer\((release|pre-release)\):\s*//')
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
- name: Determine if pre-release
run: |
echo "IS_PRE_RELEASE=$(echo "${{ github.event.head_commit.message }}" | grep -q "(pre-release):" && echo true || echo false)" >> $GITHUB_ENV
- name: Print RELEASE_NAME
run: |
echo "RELEASE_NAME=${{ env.RELEASE_NAME }}"
echo "IS_PRE_RELEASE=${{ env.IS_PRE_RELEASE }}"
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: PspPapersModInstaller
- name: Rename Artifact
run: |
mv psp_papers_installer.exe PspPapersModInstaller-win-x64.exe
- name: Create Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.RELEASE_NAME }}
files: PspPapersModInstaller-win-x64.exe
body: |
Standalone executable to automate installing and updating the Papers PSP Mod
The installer will copy itself into the Papers Please game directory. Run it again to update the mod (if any updates available)
draft: false
prerelease: ${{ env.IS_PRE_RELEASE }}