Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikihero committed Jun 1, 2024
2 parents a2336a9 + 9791d84 commit 1e3b5dc
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/listing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build Listing
env:
websiteDirectory: Website
on:
workflow_dispatch:
workflow_run:
workflows: [Build Release]
types:
- completed
release:
types: [published, created, edited, unpublished, deleted, released]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout Main Repository.
uses: actions/checkout@v2
- name: Build listing
uses: killers0992/scpsl.pluginlisting@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Pages
uses: actions/configure-pages@f156874f8191504dae5b037505266ed5dda6c382
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@a753861a5debcf57bf8b404356158c8e1e33150c
with:
path: ${{ env.websiteDirectory }}
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@9dbe3824824f8a1377b8e298bafde1a50ede43e5
62 changes: 62 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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/github-tag-action@v6.1
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 }}
11 changes: 11 additions & 0 deletions releaseInfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"displayname": "BetterCoinflips",
"description": "SCP:SL plugin that adds a Risk-Reward mechanic to the in-game coin. Whenever you flip a coin a 'random' effect will happen depending on the coinflips outcome.",
"authorName": "Miki_hero",
"buildType": 0,
"version": "4.5.0",
"scpslVersion": "13.4.2",
"loaderType": "exiled",
"gameAssemblyReferences": "Assembly-CSharp-firstpass.dll,Mirror.dll,UnityEngine.dll,UnityEngine.CoreModule.dll,UnityEngine.CoreModule.dll",
"publicizeAssemblies": "Assembly-CSharp.dll"
}

0 comments on commit 1e3b5dc

Please sign in to comment.