Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: ContentAPI Main CI

on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev

env:
CW_REFERENCES_URL: https://CircusStudios.github.io/CW-References/Master.zip
CW_REFERENCES_PATH: ${{ github.workspace }}/ContentWarning/References

jobs:
build:
runs-on: windows-latest

steps:
- name: Setup Dotnet
uses: actions/[email protected]

- uses: actions/[email protected]

- name: Get References
shell: pwsh
run: |
Invoke-WebRequest -Uri ${{ env.CW_REFERENCES_URL }} -OutFile ${{ github.workspace }}/ContentWarning/References.zip
Expand-Archive -Path References.zip -DestinationPath ${{ env.CW_REFERENCES_PATH }}

- name: Build
env:
CONTENTWARNING_REFERENCES: ${{ env.CW_REFERENCES_PATH }}
run: dotnet build

- name: Upload artifcats
uses: actions/upload-artifact@v4
with:
name: Build Results
path: ContentAPI/bin/release
42 changes: 42 additions & 0 deletions .github/workflows/push_nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: ContentAPI Release

on:
release:
types: [ published, prereleased ]


env:
CW_REFERENCES_URL: https://CircusStudios.github.io/CW-References/Master.zip
CW_REFERENCES_PATH: ${{ github.workspace }}/ContentWarning/References

jobs:
push:
runs-on: windows-latest

steps:
- name: Setup Dotnet
uses: actions/[email protected]

- uses: actions/[email protected]

- name: Get References
shell: pwsh
run: |
Invoke-WebRequest -Uri ${{ CW_REFERENCES_URL }} -OutFile ${{ github.workspace }}/ContentAPI/References.zip
Expand-Archive -Path References.Zip -DestinationPath ${{ env.CW_REFERENCES_PATH }}

- name: Build Nuget
env:
CW_REFERENCES: ${{ env.CW_REFERENCES_PATH }}
shell: pwsh
run: |
./build.ps1 -BuildNuGet
$File = (Get-ChildItem -Path . -Include 'ContentAPI.*.nupkg' -Recurse).Name
Out-File -FilePath ${{ github.env }} -InputObject "PackageFile=$File" -Encoding utf-8 -Append

- name: Push NuGet
shell: pwsh
run: nuget push ${{ env.PackageFile }} -ApiKey ${{ secrets.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json -SkipDuplicate

- name: Push generated package to GitHub registry
run: dotnet nuget push ${{ env.PackageFile }} -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/ExMod-Team/index.json --skip-duplicate