Skip to content

Commit 90aeea9

Browse files
committed
Updated GitVersion action
1 parent 51019fa commit 90aeea9

File tree

2 files changed

+64
-64
lines changed

2 files changed

+64
-64
lines changed

.github/workflows/main.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,34 @@ jobs:
1818

1919
- name: Fetch all history for all tags and branches
2020
run: git fetch --unshallow || true
21-
21+
2222
- name: Install GitVersion
23-
uses: gittools/actions/gitversion/[email protected].9
23+
uses: gittools/actions/gitversion/[email protected].13
2424
with:
25-
versionSpec: '5.x'
26-
25+
versionSpec: "5.x"
26+
2727
- name: Use GitVersion
2828
id: gitversion # step id used as reference for output values
29-
uses: gittools/actions/gitversion/[email protected].9
30-
29+
uses: gittools/actions/gitversion/[email protected].13
30+
3131
- run: |
3232
echo "NuGetVersion: ${{ steps.gitversion.outputs.nuGetVersionV2 }}"
3333
echo "NuGetPreReleaseTagV2: ${{ steps.gitversion.outputs.CommitsSinceVersionSourcePadded }}"
34-
34+
3535
- name: Setup .NET Core
3636
uses: actions/setup-dotnet@v1
3737
with:
3838
dotnet-version: 3.1.301
39-
39+
4040
- name: Install dependencies
4141
run: dotnet restore
42-
42+
4343
- name: Build solution
4444
run: dotnet build --configuration Release --no-restore
45-
45+
4646
- name: Execute unit tests
4747
run: dotnet test
48-
48+
4949
- name: Create NuGet package
5050
run: dotnet pack ./HttpBinding/HttpBinding.csproj -c Release -o ${{ env.OUTPUT_PATH }} /p:VersionPrefix=${{ steps.gitversion.outputs.nuGetVersionV2 }}
5151

@@ -63,8 +63,8 @@ jobs:
6363
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6464
with:
6565
name: Release ${{ steps.gitversion.outputs.nuGetVersionV2 }}
66-
tag_name: ${{ steps.gitversion.outputs.nuGetVersionV2 }}
66+
tag_name: ${{ steps.gitversion.outputs.nuGetVersionV2 }}
6767
files: |
6868
${{ env.OUTPUT_PATH }}AzureFunctions.HttpBinding.${{ steps.gitversion.outputs.nuGetVersionV2 }}.nupkg
6969
draft: false
70-
prerelease: true
70+
prerelease: true

.github/workflows/new-release.yml

+51-51
Original file line numberDiff line numberDiff line change
@@ -7,63 +7,63 @@ env:
77
on:
88
push:
99
tags:
10-
- '*.*.*'
10+
- "*.*.*"
1111

1212
jobs:
1313
create_release:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v2
18-
- name: Fetch all history for all tags and branches
19-
run: git fetch --unshallow || true
20-
21-
- name: Install GitVersion
22-
uses: gittools/actions/gitversion/[email protected]
23-
with:
24-
versionSpec: '5.x'
25-
26-
- name: Use GitVersion
27-
id: gitversion # step id used as reference for output values
28-
uses: gittools/actions/gitversion/[email protected]
29-
30-
- run: |
31-
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}"
32-
echo "NuGetPreReleaseTagV2: ${{ steps.gitversion.outputs.CommitsSinceVersionSourcePadded }}"
33-
34-
- name: Setup .NET Core
35-
uses: actions/setup-dotnet@v1
36-
with:
37-
dotnet-version: 3.1.301
38-
39-
- name: Install dependencies
40-
run: dotnet restore
41-
42-
- name: Build solution
43-
run: dotnet build --configuration Release --no-restore
44-
45-
- name: Execute unit tests
46-
run: dotnet test
17+
- uses: actions/checkout@v2
18+
- name: Fetch all history for all tags and branches
19+
run: git fetch --unshallow || true
4720

48-
- name: Publish NuGet
49-
uses: brandedoutcast/[email protected]
50-
with:
51-
PROJECT_FILE_PATH: HttpBinding/HttpBinding.csproj
52-
VERSION_STATIC: ${{ steps.gitversion.outputs.nuGetVersionV2 }}
53-
NUGET_KEY: ${{secrets.NUGET_KEY}}
21+
- name: Install GitVersion
22+
uses: gittools/actions/gitversion/[email protected]
23+
with:
24+
versionSpec: "5.x"
5425

55-
- name: Create NuGet package
56-
run: dotnet pack ./HttpBinding/HttpBinding.csproj -c Release -o ${{ env.OUTPUT_PATH }} /p:VersionPrefix=${{ steps.gitversion.outputs.nuGetVersionV2 }}
26+
- name: Use GitVersion
27+
id: gitversion # step id used as reference for output values
28+
uses: gittools/actions/gitversion/[email protected]
5729

58-
- name: Create release
59-
id: create_release
60-
uses: softprops/action-gh-release@v1
61-
env:
62-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63-
with:
64-
name: Release ${{ steps.gitversion.outputs.nuGetVersionV2 }}
65-
tag_name: ${{ steps.gitversion.outputs.nuGetVersionV2 }}
66-
files: |
67-
${{ env.OUTPUT_PATH }}AzureFunctions.HttpBinding.${{ steps.gitversion.outputs.nuGetVersionV2 }}.nupkg
68-
draft: false
69-
prerelease: false
30+
- run: |
31+
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}"
32+
echo "NuGetPreReleaseTagV2: ${{ steps.gitversion.outputs.CommitsSinceVersionSourcePadded }}"
33+
34+
- name: Setup .NET Core
35+
uses: actions/setup-dotnet@v1
36+
with:
37+
dotnet-version: 3.1.301
38+
39+
- name: Install dependencies
40+
run: dotnet restore
41+
42+
- name: Build solution
43+
run: dotnet build --configuration Release --no-restore
44+
45+
- name: Execute unit tests
46+
run: dotnet test
47+
48+
- name: Publish NuGet
49+
uses: brandedoutcast/[email protected]
50+
with:
51+
PROJECT_FILE_PATH: HttpBinding/HttpBinding.csproj
52+
VERSION_STATIC: ${{ steps.gitversion.outputs.nuGetVersionV2 }}
53+
NUGET_KEY: ${{secrets.NUGET_KEY}}
54+
55+
- name: Create NuGet package
56+
run: dotnet pack ./HttpBinding/HttpBinding.csproj -c Release -o ${{ env.OUTPUT_PATH }} /p:VersionPrefix=${{ steps.gitversion.outputs.nuGetVersionV2 }}
57+
58+
- name: Create release
59+
id: create_release
60+
uses: softprops/action-gh-release@v1
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
with:
64+
name: Release ${{ steps.gitversion.outputs.nuGetVersionV2 }}
65+
tag_name: ${{ steps.gitversion.outputs.nuGetVersionV2 }}
66+
files: |
67+
${{ env.OUTPUT_PATH }}AzureFunctions.HttpBinding.${{ steps.gitversion.outputs.nuGetVersionV2 }}.nupkg
68+
draft: false
69+
prerelease: false

0 commit comments

Comments
 (0)