-
Notifications
You must be signed in to change notification settings - Fork 8
62 lines (62 loc) · 2.31 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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 }}