mirror of
https://github.com/FalloutCollaborationProject/FCP-Mod-Updater.git
synced 2026-07-27 17:04:05 -07:00
72 lines
2.6 KiB
YAML
72 lines
2.6 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
env:
|
|
APP_NAME: FCPModUpdater
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v5
|
|
with:
|
|
dotnet-version: '10.0.x'
|
|
cache: true
|
|
|
|
- name: Test
|
|
run: dotnet test --configuration Release
|
|
|
|
- name: Build Windows x64 (self-contained)
|
|
run: |
|
|
dotnet publish FCPModUpdater.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -o ./publish/win-x64-sc
|
|
cp ./update-fcp-mod-manager.bat ./publish/win-x64-sc/
|
|
|
|
- name: Build Linux x64 (self-contained)
|
|
run: |
|
|
dotnet publish FCPModUpdater.csproj -c Release -r linux-x64 --self-contained true -p:PublishSingleFile=true -o ./publish/linux-x64-sc
|
|
cp ./update-fcp-mod-manager.sh ./publish/linux-x64-sc/
|
|
cp ./fcp-mod-manager.desktop ./publish/linux-x64-sc/
|
|
|
|
- name: Build Windows x64 (framework-dependent)
|
|
run: dotnet publish FCPModUpdater.csproj -c Release -r win-x64 --self-contained false -p:PublishSingleFile=false -o ./publish/win-x64-fd
|
|
|
|
- name: Build Linux x64 (framework-dependent)
|
|
run: |
|
|
dotnet publish FCPModUpdater.csproj -c Release -r linux-x64 --self-contained false -p:PublishSingleFile=false -o ./publish/linux-x64-fd
|
|
cp ./fcp-mod-manager.desktop ./publish/linux-x64-fd/
|
|
|
|
- name: Create archives
|
|
run: |
|
|
cp ./update-fcp-mod-manager.bat ./publish/
|
|
cp ./update-fcp-mod-manager.sh ./publish/
|
|
cd ./publish
|
|
zip -r "${{ env.APP_NAME }}-win-x64-selfcontained.zip" win-x64-sc
|
|
tar -czvf "${{ env.APP_NAME }}-linux-x64-selfcontained.tar.gz" linux-x64-sc
|
|
zip -r "${{ env.APP_NAME }}-win-x64.zip" win-x64-fd
|
|
tar -czvf "${{ env.APP_NAME }}-linux-x64.tar.gz" linux-x64-fd
|
|
sha256sum "${{ env.APP_NAME }}"-*.zip "${{ env.APP_NAME }}"-*.tar.gz > checksums.txt
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
generate_release_notes: true
|
|
prerelease: ${{ contains(github.ref_name, '-') }}
|
|
files: |
|
|
./publish/${{ env.APP_NAME }}-win-x64-selfcontained.zip
|
|
./publish/${{ env.APP_NAME }}-linux-x64-selfcontained.tar.gz
|
|
./publish/${{ env.APP_NAME }}-win-x64.zip
|
|
./publish/${{ env.APP_NAME }}-linux-x64.tar.gz
|
|
./publish/checksums.txt
|
|
./publish/update-fcp-mod-manager.bat
|
|
./publish/update-fcp-mod-manager.sh
|