Skip to content

Commit 55b2106

Browse files
committed
Fixed GitHub Actions setup.
1 parent a18b677 commit 55b2106

File tree

4 files changed

+46
-36
lines changed

4 files changed

+46
-36
lines changed

.github/mergify.yml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
queue_rules:
2+
- name: default
3+
conditions:
4+
- -conflict # skip PRs with conflicts
5+
- -draft # filter-out GH draft PRs
6+
- -closed # filter-out closed GH PRs
7+
- base=main
8+
- label=automerge
9+
- check-success=build
10+
- check-success=Codacy Static Code Analysis
11+
- check-success=DCO
12+
- check-success=WIP
13+
114
pull_request_rules:
215
# for check failures / WIP pending check.
316
- name: Add enhancement label
@@ -16,8 +29,9 @@ pull_request_rules:
1629
- check-success=Codacy Security Scan
1730
- -draft
1831
- -closed
32+
- -conflict
1933
- -label=automerge
20-
- author~=^(AraHaan|CatGirlsAreLife|JunichiSama|xioke|Elskom-gitsync|dependabot(|-preview)\[bot\])$
34+
- author~=^(AraHaan|CatGirlsAreLife|JunichiSama|xioke|Elskom-gitsync)$
2135
actions:
2236
label:
2337
add:
@@ -64,6 +78,15 @@ pull_request_rules:
6478
comment:
6579
message: This PR is WIP, when you complete the work remember to unset the WIP state in the title of this PR.
6680

81+
- name: Automatic message on conflict
82+
conditions:
83+
- -draft
84+
- conflict
85+
actions:
86+
comment:
87+
message: |
88+
This PR is conflicted :sob:.
89+
6790
- name: Automatic merge when automerge label added
6891
conditions:
6992
- -conflict # skip PRs with conflicts
@@ -86,10 +109,11 @@ pull_request_rules:
86109
review:
87110
type: APPROVE
88111
message: Automatically approving since automerge label was found.
89-
merge:
90-
strict: smart+fasttrack
91-
strict_method: rebase
112+
queue:
113+
name: default
92114
method: squash
115+
update_method: rebase
116+
commit_message: default
93117

94118
- name: Remove automerge label
95119
conditions:

.github/workflows/codacy-analysis.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,22 @@ jobs:
1818
codacy-security-scan:
1919
name: Codacy Security Scan
2020
runs-on: ubuntu-latest
21+
env:
22+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
23+
DOTNET_CLI_TELEMETRY_OPTOUT: true
24+
DOTNET_NOLOGO: true
25+
BUILD_RERUN_COUNT: ${{ github.run_attempt }}
2126
steps:
2227
# Checkout the repository to the GitHub Actions runner
2328
- name: Checkout code
2429
uses: actions/checkout@main
2530

26-
- name: .NET core build
27-
uses: actions/setup-dotnet@main
28-
with:
29-
dotnet-version: '6.0.x'
30-
include-prerelease: true
31+
- name: Install latest .NET SDK
32+
uses: Elskom/setup-latest-dotnet@main
3133

32-
- name: Restore, Build, test, and pack
34+
- name: Restore, Build, and test
3335
uses: Elskom/build-dotnet@main
3436
with:
35-
SOLUTION_FILE_PATH: GitBuildInfo.SourceGenerator.sln
3637
TEST: true
3738
PACK: false
3839

.github/workflows/dotnetcore-build.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,14 @@ jobs:
1111
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
1212
DOTNET_CLI_TELEMETRY_OPTOUT: true
1313
DOTNET_NOLOGO: true
14+
BUILD_RERUN_COUNT: ${{ github.run_attempt }}
1415
steps:
1516
- uses: actions/checkout@main
16-
- name: .NET core build
17-
uses: actions/setup-dotnet@main
18-
with:
19-
dotnet-version: '6.0.x'
20-
include-prerelease: true
17+
18+
- name: Install latest .NET SDK
19+
uses: Elskom/setup-latest-dotnet@main
2120

2221
- name: Restore, Build, test, and pack
2322
uses: Elskom/build-dotnet@main
2423
with:
25-
SOLUTION_FILE_PATH: GitBuildInfo.SourceGenerator.sln
2624
TEST: true

.github/workflows/dotnetcore-publish.yml

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,16 @@ jobs:
1212
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
1313
DOTNET_CLI_TELEMETRY_OPTOUT: true
1414
DOTNET_NOLOGO: true
15+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
16+
BUILD_RERUN_COUNT: ${{ github.run_attempt }}
1517
steps:
1618
- uses: actions/checkout@main
17-
- name: .NET core build
18-
uses: actions/setup-dotnet@main
19-
with:
20-
dotnet-version: '6.0.x'
21-
include-prerelease: true
19+
20+
- name: Install latest .NET SDK
21+
uses: Elskom/setup-latest-dotnet@main
2222

2323
- name: Restore, Build, test, and pack
2424
uses: Elskom/build-dotnet@main
2525
with:
26-
SOLUTION_FILE_PATH: GitBuildInfo.SourceGenerator.sln
2726
TEST: true
28-
29-
- name: Publish Release
30-
id: publish_nuget
31-
uses: Elskom/publish-nuget@main
32-
with:
33-
# Filepath of the project to be packaged, relative to root of repository
34-
PROJECT_FILE_PATH: '**/*.csproj'
35-
# Path to store all generated nuget packages, relative to root of repository
36-
PACKAGE_PATH: artifacts/
37-
# Flag to toggle git tagging, enabled by default
38-
TAG_COMMIT: false
39-
# API key to authenticate with NuGet server
40-
NUGET_KEY: ${{ secrets.NUGET_API_KEY }}
27+
PUSH: true

0 commit comments

Comments
 (0)