Skip to content

Build Release

Build Release #5

Workflow file for this run

name: Build Release
on:
workflow_dispatch:
env:
NET_FRAMEWORK_VERSION: "net48"
PROJECT_NAME: "/BetterCoinflips"
ASSEMBLY_NAME: "BetterCoinflips.dll"
SL_REFERENCES: "${{ github.workspace }}/References"
UNITY_REFERENCES: "${{ github.workspace }}/References"
EXILED_REFERENCES: "${{ github.workspace }}/References"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout main repository.
uses: actions/checkout@v4
- name: Get Release Info
id: release-info
uses: zoexx/github-action-json-file-properties@b9f36ce6ee6fe2680cd3c32b2c62e22eade7e590
with:
file_path: "${{ github.workspace }}/releaseInfo.json"
- name: Set Environment Variables
run: |
echo "version=${{ steps.release-info.outputs.version }}" >> $GITHUB_ENV
echo "gameAssemblyReferences=${{ steps.release-info.outputs.gameAssemblyReferences }}" >> $GITHUB_ENV
echo "publicizeAssemblies=${{ steps.release-info.outputs.publicizeAssemblies }}" >> $GITHUB_ENV
- name: Download SCP SL References
uses: killers0992/scpsl.downloadfiles@master
with:
branch: 'public'
filesToDownload: ${{ env.gameAssemblyReferences }}
- name: Publicize Assemblies
uses: killers0992/scpsl.assemblypublicizer@master
with:
assemblies: ${{ env.publicizeAssemblies }}
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: Build
run: dotnet build --configuration Release
- name: Upload
uses: actions/upload-artifact@v3
with:
name: Agents
path: ${{ github.workspace }}${{ env.PROJECT_NAME }}/bin/Release/${{ env.NET_FRAMEWORK_VERSION }}/${{ env.ASSEMBLY_NAME }}.dll
- 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 }}${{ env.PROJECT_NAME }}/bin/Release/${{ env.NET_FRAMEWORK_VERSION }}/${{ env.ASSEMBLY_NAME }}.dll
${{ github.workspace }}/releaseInfo.json
tag_name: ${{ env.version }}