forked from i2van/LPRun
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CodeQL workflow and reformat workflows
- Loading branch information
1 parent
03d054c
commit d5f0bd4
Showing
2 changed files
with
59 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
on: [push, pull_request] | ||
|
||
env: | ||
SLN: LPRun.sln | ||
SLN: LPRun.sln | ||
SLN_CONFIG: Release | ||
BIN_POSTFIX: .Bin | ||
RETENTION_DAYS: 1 | ||
|
@@ -13,33 +13,31 @@ jobs: | |
runs-on: windows-latest | ||
|
||
steps: | ||
# Set up | ||
|
||
# Set up | ||
- name: Setup .NET | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
- name: Setup .NET | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: | | ||
8.0.x | ||
# Check out | ||
|
||
# Check out | ||
- name: Check out ${{env.SLN}} | ||
uses: actions/[email protected] | ||
|
||
- name: Check out ${{env.SLN}} | ||
uses: actions/[email protected] | ||
# LPRun | ||
|
||
# LPRun | ||
- name: Restore ${{env.SLN}} | ||
run: dotnet restore ${{env.SLN}} | ||
|
||
- name: Restore ${{env.SLN}} | ||
run: dotnet restore ${{env.SLN}} | ||
- name: Build ${{env.SLN}} ${{env.SLN_CONFIG}} | ||
run: dotnet build ${{env.SLN}} --configuration ${{env.SLN_CONFIG}} --no-restore -p:GITHUB_ACTIONS=true | ||
|
||
- name: Build ${{env.SLN}} ${{env.SLN_CONFIG}} | ||
run: dotnet build ${{env.SLN}} --configuration ${{env.SLN_CONFIG}} --no-restore -p:GITHUB_ACTIONS=true | ||
# Upload artifacts | ||
|
||
# Upload artifacts | ||
|
||
- name: Publish LPRun ${{env.SLN_CONFIG}} | ||
uses: actions/[email protected] | ||
with: | ||
name: LPRun${{env.BIN_POSTFIX}} | ||
path: bin/${{env.SLN_CONFIG}}/LPRun.*.*nupkg | ||
retention-days: ${{env.RETENTION_DAYS}} | ||
- name: Publish LPRun ${{env.SLN_CONFIG}} | ||
uses: actions/[email protected] | ||
with: | ||
name: LPRun${{env.BIN_POSTFIX}} | ||
path: bin/${{env.SLN_CONFIG}}/LPRun.*.*nupkg | ||
retention-days: ${{env.RETENTION_DAYS}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,12 +6,16 @@ on: | |
pull_request: | ||
branches: [main, develop] | ||
schedule: | ||
- cron: '40 19 * * 0' | ||
- cron: "40 19 * * 0" | ||
|
||
env: | ||
SLN: LPRun.sln | ||
SLN_CONFIG: Release | ||
BIN_POSTFIX: .Bin | ||
RETENTION_DAYS: 1 | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze (${{ matrix.language }}) | ||
|
||
runs-on: windows-latest | ||
timeout-minutes: 120 | ||
permissions: | ||
|
@@ -29,34 +33,36 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
include: | ||
- language: csharp | ||
build-mode: manual | ||
- language: csharp | ||
build-mode: manual | ||
|
||
name: Analyze (${{ matrix.language }}) | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: ${{ matrix.language }} | ||
build-mode: ${{ matrix.build-mode }} | ||
|
||
- name: Setup .NET | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
- if: matrix.build-mode == 'manual' | ||
name: Restore ${{env.SLN}} | ||
run: dotnet restore ${{env.SLN}} | ||
|
||
- if: matrix.build-mode == 'manual' | ||
name: Build ${{env.SLN}} ${{env.SLN_CONFIG}} | ||
run: dotnet build ${{env.SLN}} --configuration ${{env.SLN_CONFIG}} --no-restore -p:GITHUB_ACTIONS=true | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 | ||
with: | ||
category: "/language:${{matrix.language}}" | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: ${{ matrix.language }} | ||
build-mode: ${{ matrix.build-mode }} | ||
|
||
- name: Setup .NET | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
- if: matrix.build-mode == 'manual' | ||
name: Restore ${{env.SLN}} | ||
run: dotnet restore ${{env.SLN}} | ||
|
||
- if: matrix.build-mode == 'manual' | ||
name: Build ${{env.SLN}} ${{env.SLN_CONFIG}} | ||
run: dotnet build ${{env.SLN}} --configuration ${{env.SLN_CONFIG}} --no-restore -p:GITHUB_ACTIONS=true | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 | ||
with: | ||
category: "/language:${{matrix.language}}" |