Skip to content

Commit 0715ec5

Browse files
committed
New Pipelines and release
1 parent b888dd7 commit 0715ec5

File tree

5 files changed

+145
-25
lines changed

5 files changed

+145
-25
lines changed

.github/release.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
changelog:
2+
categories:
3+
- title: 🏕 Features
4+
labels:
5+
- '*'
6+
exclude:
7+
labels:
8+
- dependencies
9+
- title: 👒 Dependencies
10+
labels:
11+
- dependencies

.github/workflows/codeql-analysis.yml

+37-22
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,24 @@
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"
1+
name: "Code Analysis"
132

143
on:
15-
push:
4+
push: # The master branch must be analyzed on a new commit
165
branches: [ master ]
176
pull_request:
18-
# The branches below must be a subset of the branches above
7+
# Any PR on master must be analyzed
198
branches: [ master ]
20-
schedule:
21-
- cron: '39 18 * * 0'
22-
workflow_dispatch:
9+
workflow_dispatch: # CodeQL can be triggered manually
2310

2411
jobs:
25-
analyze:
26-
name: Analyze
27-
runs-on: [self-hosted, windows-latest]
12+
analyzeQL:
13+
name: Analyze with CodeQL
14+
runs-on: [ubuntu-latest]
15+
16+
permissions:
17+
# required for all workflows
18+
security-events: write
19+
20+
# required to fetch internal or private CodeQL packs
21+
packages: read
2822

2923
strategy:
3024
fail-fast: false
@@ -33,20 +27,41 @@ jobs:
3327

3428
steps:
3529
- name: Checkout repository
36-
uses: actions/checkout@v4.1.2
30+
uses: actions/checkout@v4
3731

3832
- name: Initialize CodeQL
3933
uses: github/codeql-action/init@v3
4034
with:
4135
languages: ${{ matrix.language }}
36+
4237

4338
- name: Setup .NET Core SDK
4439
uses: actions/[email protected]
4540
with:
46-
dotnet-version: 7.x
41+
dotnet-version: ${{vars.DOTNET_VERSION}}
4742

4843
- run: dotnet restore
4944
- run: dotnet build ./FASTER.sln --configuration Debug
5045

5146
- name: Perform CodeQL Analysis
5247
uses: github/codeql-action/analyze@v3
48+
49+
AnalysisSonar:
50+
name: Analyze with SonarCloud
51+
runs-on: ubuntu-latest
52+
permissions:
53+
pull-requests: write # allows SonarCloud to decorate PRs with analysis results
54+
55+
steps:
56+
- name: Analyze with SonarCloud
57+
58+
# You can pin the exact commit or the version.
59+
uses: SonarSource/sonarcloud-github-action@v3
60+
env:
61+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
62+
with:
63+
# Additional arguments for the SonarScanner CLI
64+
args:
65+
-Dsonar.projectKey=Foxlider_FASTER
66+
-Dsonar.organization=foxlicorp
67+
projectBaseDir: .

.github/workflows/publish.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ jobs:
1616
identifier: Foxlider.FASTER
1717
installers-regex: 'Release_x64.zip'
1818
max-versions-to-keep: 5
19-
token: ${{ secrets.WINGET_TOKEN }} # Classic Personal Access Token with [public_repo, workflow] scopes
19+
# Classic Personal Access Token with [public_repo, workflow] scopes
20+
token: ${{ secrets.WINGET_TOKEN }}

.github/workflows/release.yml

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: "Release Generator"
2+
3+
# after successful analysis on the main branch, a new pre-release is generated
4+
on:
5+
workflow_run:
6+
workflows: [Code Analysis]
7+
types: [completed]
8+
branches: [master]
9+
10+
jobs:
11+
12+
# BUILD APP
13+
build:
14+
15+
strategy:
16+
matrix:
17+
runtime: [x64, x86]
18+
19+
runs-on: windows-latest # For a list of available runner types, refer to
20+
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
21+
22+
env:
23+
Configuration: Release
24+
Solution_Name: FASTER # Replace with your solution name, i.e. MyWpfApp.sln.
25+
Test_Project_Path: FASTERTests\FASTERTests.csproj # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj.
26+
Wap_Project_Directory: FASTER # Replace with the Wap project directory relative to the solution, i.e. MyWpfApp.Package.
27+
Wap_Project_Path: FASTER.App.Package\FASTER.Package.wapproj # Replace with the path to your Wap project, i.e. MyWpf.App.Package\MyWpfApp.Package.wapproj.
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0
34+
35+
# Install the .NET Core workload
36+
- name: Install .NET Core
37+
uses: actions/setup-dotnet@v4
38+
with:
39+
dotnet-version: ${{vars.DOTNET_VERSION}}
40+
41+
# Execute all unit tests in the solution
42+
- name: Execute unit tests
43+
run: dotnet test
44+
45+
# Restore the application to populate the obj folder with RuntimeIdentifiers
46+
- name: Restore the application
47+
run: dotnet restore
48+
49+
# Build
50+
- name: Build the application
51+
run: dotnet build --configuration $env:Configuration -a $env:Runtime ./FASTER/FASTER.csproj
52+
env:
53+
Runtime: ${{ matrix.runtime }}
54+
55+
# Pub
56+
- name: Publish the application $env:Runtime
57+
run: dotnet publish --configuration $env:Configuration -a $env:Runtime --self-contained true /p:useapphost=true --output .\Release_Nightly_$env:Runtime ./FASTER/FASTER.csproj
58+
env:
59+
Runtime: ${{ matrix.runtime }}
60+
61+
62+
# Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact
63+
# - name: Upload build artifacts
64+
# uses: actions/upload-artifact@v4
65+
# with:
66+
# name: Release_Nightly_${{ env.Runtime }}
67+
# path: .\FASTER_Nightly_${{ env.Runtime }}
68+
# env:
69+
# Runtime: ${{ matrix.runtime }}
70+
71+
- name: Create Release
72+
id: create_release
73+
uses: actions/create-release@v1
74+
env:
75+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
76+
with:
77+
tag_name: ${{ github.ref }}
78+
release_name: Release ${{ github.ref }}
79+
draft: false
80+
prerelease: true
81+
#Upload Artifacts
82+
- name: Upload Release Asset
83+
id: upload-release-asset
84+
uses: actions/upload-release-asset@v1
85+
env:
86+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87+
Runtime: ${{ matrix.runtime }}
88+
with:
89+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
90+
asset_path: .\FASTER_Nightly_${{ env.Runtime }}.zip
91+
asset_name: Release_Nightly_${{ env.Runtime }}.zip
92+
asset_content_type: application/zip
93+

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ For changes that address core functionality or would require breaking changes (e
4343
In general, we follow the ["fork-and-pull" Git workflow](https://github.com/susam/gitpr)
4444
While a bit different, it is generally the same idea.
4545

46-
1. Fork the repository to your own Github account
46+
1. Fork the repository to your own GitHub account
4747
2. Clone the project to your machine
48-
3. Create a branch locally with a succinct but descriptive name. It is preferred to branch from the current update branch that should be named feature/Update-X.Y
48+
3. Create a branch locally with a succinct but descriptive name. It is preferred to branch from the current update branch that should be named `feature/shortName`
4949
4. Commit changes to the branch
5050
5. Following any formatting and testing guidelines specific to this repo
5151
6. Push changes to your fork

0 commit comments

Comments
 (0)