Skip to content

Commit f979171

Browse files
committed
πŸ‘· Unifying the build in GitHub Actions
No need for separate Linux and Windows builds using modern .NET πŸ‘πŸ»
1 parent b81fa40 commit f979171

File tree

5 files changed

+66
-58
lines changed

5 files changed

+66
-58
lines changed

β€Ž.github/dependabot.ymlβ€Ž

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
11
version: 2
2+
23
updates:
3-
- package-ecosystem: nuget
4-
directory: "/"
5-
schedule:
6-
interval: daily
7-
time: "20:00"
8-
timezone: Greenwich
9-
open-pull-requests-limit: 10
10-
ignore:
11-
- dependency-name: Swashbuckle.AspNetCore
12-
versions:
13-
- 6.0.2
14-
- 6.0.3
15-
- 6.0.4
16-
- 6.0.5
17-
- 6.0.6
18-
- 6.0.7
19-
- 6.1.0
20-
- 6.1.1
21-
- 6.1.2
22-
- dependency-name: Microsoft.NET.Test.Sdk
23-
versions:
24-
- 16.8.3
25-
- 16.9.1
26-
- dependency-name: Microsoft.VisualStudio.Web.CodeGeneration.Design
27-
versions:
28-
- 5.0.1
4+
- cooldown:
5+
default-days: 14
6+
semver-major-days: 30
7+
semver-minor-days: 14
8+
semver-patch-days: 7
9+
10+
directory: "/"
11+
12+
# This consolidates updates into a maximum of 2 PRs.
13+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/optimizing-pr-creation-version-updates
14+
groups:
15+
major:
16+
update-types:
17+
- major
18+
19+
minor-and-patch:
20+
update-types:
21+
- minor
22+
- patch
23+
24+
open-pull-requests-limit: 10
25+
package-ecosystem: nuget
26+
27+
schedule:
28+
day: monday
29+
interval: weekly
30+
time: "20:00"
31+
timezone: Europe/London

β€Ž.github/workflows/build.ymlβ€Ž

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
pull_request:
9+
branches:
10+
- main
11+
12+
workflow_dispatch:
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check out the repo
19+
uses: actions/checkout@v5
20+
21+
- name: Set up .NET
22+
uses: actions/setup-dotnet@v5
23+
with:
24+
dotnet-version: "6.0.x"
25+
26+
- name: Restore dependencies
27+
run: dotnet restore
28+
29+
- name: Build and pack the project
30+
run: dotnet pack --configuration Release --no-restore --output ${{ github.workspace }}/nuget
31+
32+
- name: Run tests
33+
run: dotnet test
34+
35+
- name: Publish the NuGet package
36+
run: dotnet nuget push ${{ github.workspace }}/nuget/*.nupkg --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate

β€Ž.travis.ymlβ€Ž

Lines changed: 0 additions & 9 deletions
This file was deleted.

β€ŽWhatIsHeDoing.DomainModels/WhatIsHeDoing.DomainModels.csprojβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1616
<Company />
1717
<RepositoryUrl>https://github.com/WhatIsHeDoing/WhatIsHeDoing.DomainModels</RepositoryUrl>
18+
<PackageReadmeFile>../README.md</PackageReadmeFile>
1819
</PropertyGroup>
1920

2021
<PropertyGroup>

β€Žappveyor.ymlβ€Ž

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
Β (0)