Build Release #118
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Release | |
on: | |
workflow_dispatch: | |
env: | |
SL_REFERENCES: "${{ github.workspace }}/References/SCPSL_Data/Managed" | |
UNITY_REFERENCES: "${{ github.workspace }}/References/SCPSL_Data/Managed" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
env: | |
releasePath: "${{ github.workspace }}/main/XProxy.Shared" | |
steps: | |
- name: Checkout main repository. | |
uses: actions/checkout@v4 | |
with: | |
path: main | |
- name: Download SCP SL References | |
uses: killers0992/scpsl.downloadfiles@master | |
with: | |
branch: 'public' | |
filesToDownload: 'Assembly-CSharp.dll,Mirror.dll,BouncyCastle.Cryptography.dll,NorthwoodLib.dll,UnityEngine.CoreModule.dll' | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 9.0.x | |
- name: Publish Linux x64 | |
run: dotnet publish ${{ github.workspace }}/main/XProxy/XProxy.csproj --configuration Release --self-contained false -p:PublishSingleFile=true --runtime linux-x64 | |
- name: Publish Windows x64 | |
run: dotnet publish ${{ github.workspace }}/main/XProxy/XProxy.csproj --configuration Release --self-contained false -p:PublishSingleFile=true --runtime win-x64 | |
- name: Publish Core | |
run: dotnet publish ${{ github.workspace }}/main/XProxy.Core/XProxy.Core.csproj --configuration Release --self-contained --runtime win-x64 | |
- name: Build release | |
id: build-release | |
uses: ./main/XProxy.BuildRelease | |
- name: Get Release Info | |
id: release-info | |
uses: zoexx/github-action-json-file-properties@b9f36ce6ee6fe2680cd3c32b2c62e22eade7e590 | |
with: | |
file_path: "${{ github.workspace }}/main/releaseinfo.json" | |
- name: Set Environment Variables | |
run: | | |
echo "version=${{ steps.release-info.outputs.version }}" >> $GITHUB_ENV | |
- name: Create Tag | |
id: tag_version | |
uses: mathieudutour/[email protected] | |
with: | |
github_token: "${{ secrets.GITHUB_TOKEN }}" | |
tag_prefix: "" | |
custom_tag: "${{ env.version }}" | |
- name: Make Release | |
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 | |
with: | |
files: | | |
${{ github.workspace }}/main/XProxy/bin/Release/net8.0/linux-x64/publish/XProxy | |
${{ github.workspace }}/main/XProxy/bin/Release/net8.0/win-x64/publish/XProxy.exe | |
${{ github.workspace }}/main/XProxy.Core/bin/Release/net8.0/win-x64/publish/XProxy.Core.dll | |
${{ github.workspace }}/main/dependencies.zip | |
${{ github.workspace }}/main/releaseinfo.json | |
tag_name: ${{ env.version }} |