Skip to content

Commit c017c6b

Browse files
committed
Merge branch 'master' of https://github.com/Bill3621/CustomItems
2 parents deb444c + 78a3880 commit c017c6b

File tree

3 files changed

+141
-1
lines changed

3 files changed

+141
-1
lines changed

.github/workflows/codeql.yml

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL Advanced"
13+
14+
on:
15+
push:
16+
branches: [ "master" ]
17+
pull_request:
18+
branches: [ "master" ]
19+
schedule:
20+
- cron: '19 1 * * 1'
21+
22+
env:
23+
SL_BETA: ""
24+
SL_BETA_PASSWORD: ""
25+
SL_REFERENCES: ../References
26+
27+
28+
jobs:
29+
analyze:
30+
name: Analyze (${{ matrix.language }})
31+
# Runner size impacts CodeQL analysis time. To learn more, please see:
32+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
33+
# - https://gh.io/supported-runners-and-hardware-resources
34+
# - https://gh.io/using-larger-runners (GitHub.com only)
35+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
36+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'windows-latest' }}
37+
permissions:
38+
# required for all workflows
39+
security-events: write
40+
41+
# required to fetch internal or private CodeQL packs
42+
packages: read
43+
44+
# only required for workflows in private repositories
45+
actions: read
46+
contents: read
47+
48+
strategy:
49+
fail-fast: false
50+
matrix:
51+
include:
52+
- language: csharp
53+
build-mode: autobuild
54+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
55+
# Use `c-cpp` to analyze code written in C, C++ or both
56+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
57+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
58+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
59+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
60+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
61+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
62+
steps:
63+
- name: Checkout repository
64+
uses: actions/checkout@v4
65+
66+
# Set up dependencies
67+
- name: Setup .NET 9.0
68+
uses: actions/setup-dotnet@v4
69+
with:
70+
dotnet-version: 9.0.x
71+
72+
- name: Clone SecretLabDependenciesBuilder
73+
run: |
74+
git clone https://x-access-token:${{ secrets.MY_PAT }}@github.com/Bill3621/SecretLabDependenciesBuilder.git
75+
76+
- name: Build SecretLabDependenciesBuilder
77+
run: |
78+
dotnet publish SecretLabDependenciesBuilder/SecretLabDependenciesBuilder/SecretLabDependenciesBuilder.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -o builder-out
79+
80+
- name: Run SecretLabDependenciesBuilder
81+
run: |
82+
builder-out/SecretLabDependenciesBuilder.exe
83+
84+
- name: Create plugin output directory
85+
run: mkdir "%USERPROFILE%\AppData\Roaming\SCP Secret Laboratory\LabAPI\plugins\global"
86+
shell: cmd
87+
88+
# Add any setup steps before running the `github/codeql-action/init` action.
89+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
90+
# or others). This is typically only required for manual builds.
91+
# - name: Setup runtime (example)
92+
# uses: actions/setup-example@v1
93+
94+
# Initializes the CodeQL tools for scanning.
95+
- name: Initialize CodeQL
96+
uses: github/codeql-action/init@v3
97+
with:
98+
languages: ${{ matrix.language }}
99+
build-mode: ${{ matrix.build-mode }}
100+
# If you wish to specify custom queries, you can do so here or in a config file.
101+
# By default, queries listed here will override any specified in a config file.
102+
# Prefix the list here with "+" to use these queries and those in the config file.
103+
104+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
105+
# queries: security-extended,security-and-quality
106+
107+
# If the analyze step fails for one of the languages you are analyzing with
108+
# "We were unable to automatically build your code", modify the matrix above
109+
# to set the build mode to "manual" for that language. Then modify this step
110+
# to build your code.
111+
# ℹ️ Command-line programs to run using the OS shell.
112+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
113+
- if: matrix.build-mode == 'manual'
114+
shell: bash
115+
run: |
116+
echo 'If you are using a "manual" build mode for one or more of the' \
117+
'languages you are analyzing, replace this with the commands to build' \
118+
'your code, for example:'
119+
echo ' make bootstrap'
120+
echo ' make release'
121+
exit 1
122+
123+
- name: Perform CodeQL Analysis
124+
uses: github/codeql-action/analyze@v3
125+
with:
126+
category: "/language:${{matrix.language}}"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
## 📦 Example
7272
7373
Want a concrete implementation?
74-
Check out [`API/Example/EMPGrenade.cs`](CustomItems-LabAPI/API/Example/EMPGrenade.cs) to see how to build a functioning custom item with event hooks and effects!
74+
Check out [`API/Example`](CustomItems-LabAPI/API/Example) to see how to build a functioning custom item with event hooks and effects!
7575
7676
---
7777

config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
AssembliesToPublicize:
2+
- Assembly-CSharp.dll
3+
- Assembly-CSharp-firstpass.dll
4+
- CommandSystem.Core.dll
5+
- LabApi.dll
6+
- Mirror.dll
7+
- Pooling.dll
8+
- UnityEngine.dll
9+
- UnityEngine.CoreModule.dll
10+
- UnityEngine.PhysicsModule.dll
11+
ZipReferences: false
12+
ReferencesZipName: References.zip
13+
SaveReferencesToFolder: true
14+
ReferencesFolderName: References

0 commit comments

Comments
 (0)