Skip to content

Commit aaf6b18

Browse files
Merge pull request #57 from MakingSense/delivery-nuget-to-github-packages
Delivery nuget to GitHub packages
2 parents 073cf29 + 88bd4cc commit aaf6b18

File tree

2 files changed

+39
-6
lines changed

2 files changed

+39
-6
lines changed

.github/workflows/dotnet.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ on:
77
branches: [ master ]
88

99
jobs:
10-
build:
11-
10+
continuous-delivery:
11+
name: Continuous Delivery
1212
runs-on: ubuntu-latest
13-
1413
steps:
15-
- uses: actions/checkout@v3
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
1618
- name: Setup .NET
1719
uses: actions/setup-dotnet@v2
1820
with:
@@ -23,3 +25,30 @@ jobs:
2325
run: dotnet build --no-restore
2426
- name: Test
2527
run: dotnet test --no-build --verbosity normal
28+
- name: Install GitVersion
29+
uses: gittools/actions/gitversion/[email protected]
30+
with:
31+
versionSpec: '5.x'
32+
- name: Determine Version
33+
id: gitversion # step id used as reference for output values
34+
uses: gittools/actions/gitversion/[email protected]
35+
- name: Semantic Version
36+
run: |
37+
echo "SemVer: ${{ steps.gitversion.outputs.semVer }}"
38+
echo "FullSemVer: ${{ steps.gitversion.outputs.fullSemVer }}"
39+
echo "NuGetVersion: ${{ steps.gitversion.outputs.nuGetVersion }}"
40+
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}"
41+
echo "Major: ${{ steps.gitversion.outputs.major }}"
42+
echo "Minor: ${{ steps.gitversion.outputs.minor }}"
43+
echo "Patch: ${{ steps.gitversion.outputs.patch }}"
44+
echo "PreReleaseTag: ${{ steps.gitversion.outputs.preReleaseTag }}"
45+
- name: Pack nuget
46+
run: dotnet pack --output ./artifacts -p:Version=${{ steps.gitversion.outputs.nuGetVersion }}
47+
- name: Upload artifact
48+
uses: actions/[email protected]
49+
with:
50+
name: artifacts
51+
path: ./artifacts
52+
- name: Delivery nuget to Github Packages
53+
if: ${{ github.actor != 'dependabot[bot]' }}
54+
run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source 'https://nuget.pkg.github.com/MakingSense/index.json'

MakingSense.AspNetCore.HypermediaApi.sln

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26228.4
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.2.32505.173
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{08BF1979-B13B-4728-ADD3-F5DEBADB527D}"
77
EndProject
@@ -11,6 +11,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1111
.gitattributes = .gitattributes
1212
.gitignore = .gitignore
1313
appveyor.yml = appveyor.yml
14+
.github\workflows\dotnet.yml = .github\workflows\dotnet.yml
1415
LICENSE = LICENSE
1516
README.md = README.md
1617
EndProjectSection
@@ -41,4 +42,7 @@ Global
4142
{3EEDECD4-F720-48E3-8323-091B7B8F53FE} = {08BF1979-B13B-4728-ADD3-F5DEBADB527D}
4243
{A2BADEF1-ACA2-4249-80C5-3AACE53B2339} = {08BF1979-B13B-4728-ADD3-F5DEBADB527D}
4344
EndGlobalSection
45+
GlobalSection(ExtensibilityGlobals) = postSolution
46+
SolutionGuid = {3D50E176-607E-4A0A-88AB-FACC2B168DBF}
47+
EndGlobalSection
4448
EndGlobal

0 commit comments

Comments
 (0)