Skip to content

Commit 8cc25f1

Browse files
committed
Updated GitVersion
1 parent 96c4e8e commit 8cc25f1

File tree

2 files changed

+99
-103
lines changed

2 files changed

+99
-103
lines changed
Lines changed: 51 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,51 @@
1-
name: Build, Test and Release a Beta version
2-
3-
on:
4-
push:
5-
branches: [ develop ]
6-
7-
jobs:
8-
build:
9-
10-
runs-on: ubuntu-latest
11-
12-
steps:
13-
- uses: actions/checkout@v2
14-
- name: Fetch all history for all tags and branches
15-
run: git fetch --unshallow || true
16-
17-
- name: Install GitVersion
18-
uses: gittools/actions/gitversion/[email protected]
19-
with:
20-
versionSpec: '5.x'
21-
22-
- name: Use GitVersion
23-
id: gitversion # step id used as reference for output values
24-
uses: gittools/actions/gitversion/[email protected]
25-
26-
- run: |
27-
echo "NuGetVersion: ${{ steps.gitversion.outputs.NuGetVersionV2 }}"
28-
29-
- uses: actions/checkout@v2
30-
- name: Setup .NET Core
31-
uses: actions/setup-dotnet@v1
32-
with:
33-
dotnet-version: 3.1.301
34-
35-
- name: Install dependencies
36-
run: dotnet restore ./src/AzureFunctions.SqlBinding/AzureFunctions.SqlBinding.csproj
37-
38-
- name: Build
39-
run: dotnet build ./src/AzureFunctions.SqlBinding/AzureFunctions.SqlBinding.csproj --configuration Release --no-restore
40-
41-
- name: Test
42-
run: dotnet test ./src/AzureFunctions.SqlBinding/AzureFunctions.SqlBinding.csproj --no-restore --verbosity normal
43-
44-
- name: Create Release
45-
id: create_release
46-
uses: actions/create-release@v1
47-
env:
48-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
49-
with:
50-
tag_name: ${{ steps.gitversion.outputs.NuGetVersionV2 }}
51-
release_name: Release ${{ steps.gitversion.outputs.NuGetVersionV2 }}
52-
prerelease: true
53-
1+
name: Build, Test and Release a Beta version
2+
3+
on:
4+
push:
5+
branches: [develop]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Fetch all history for all tags and branches
14+
run: git fetch --unshallow || true
15+
16+
- name: Install GitVersion
17+
uses: gittools/actions/gitversion/[email protected]
18+
with:
19+
versionSpec: "5.x"
20+
21+
- name: Use GitVersion
22+
id: gitversion # step id used as reference for output values
23+
uses: gittools/actions/gitversion/[email protected]
24+
25+
- run: |
26+
echo "NuGetVersion: ${{ steps.gitversion.outputs.NuGetVersionV2 }}"
27+
28+
- uses: actions/checkout@v2
29+
- name: Setup .NET Core
30+
uses: actions/setup-dotnet@v1
31+
with:
32+
dotnet-version: 3.1.301
33+
34+
- name: Install dependencies
35+
run: dotnet restore ./src/AzureFunctions.SqlBinding/AzureFunctions.SqlBinding.csproj
36+
37+
- name: Build
38+
run: dotnet build ./src/AzureFunctions.SqlBinding/AzureFunctions.SqlBinding.csproj --configuration Release --no-restore
39+
40+
- name: Test
41+
run: dotnet test ./src/AzureFunctions.SqlBinding/AzureFunctions.SqlBinding.csproj --no-restore --verbosity normal
42+
43+
- name: Create Release
44+
id: create_release
45+
uses: actions/create-release@v1
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
48+
with:
49+
tag_name: ${{ steps.gitversion.outputs.NuGetVersionV2 }}
50+
release_name: Release ${{ steps.gitversion.outputs.NuGetVersionV2 }}
51+
prerelease: true

.github/workflows/main.yml

Lines changed: 48 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,48 @@
1-
name: Build, Test & Release to Nuget from master branch
2-
3-
on:
4-
push:
5-
branches: [ main ]
6-
7-
jobs:
8-
build:
9-
10-
runs-on: ubuntu-latest
11-
12-
steps:
13-
- uses: actions/checkout@v2
14-
- name: Fetch all history for all tags and branches
15-
run: git fetch --unshallow || true
16-
17-
- name: Install GitVersion
18-
uses: gittools/actions/gitversion/[email protected]
19-
with:
20-
versionSpec: '5.x'
21-
22-
- name: Use GitVersion
23-
id: gitversion # step id used as reference for output values
24-
uses: gittools/actions/gitversion/[email protected]
25-
26-
- run: |
27-
echo "NuGetVersion: ${{ steps.gitversion.outputs.nuGetVersion }}"
28-
echo "NuGetPreReleaseTagV2: ${{ steps.gitversion.outputs.CommitsSinceVersionSourcePadded }}"
29-
30-
- name: Setup .NET Core
31-
uses: actions/setup-dotnet@v1
32-
with:
33-
dotnet-version: 3.1.301
34-
35-
- name: Install dependencies
36-
run: dotnet restore ./src/AzureFunctions.SqlBinding/AzureFunctions.SqlBinding.csproj
37-
38-
- name: Build
39-
run: dotnet build ./src/AzureFunctions.SqlBinding/AzureFunctions.SqlBinding.csproj --configuration Release --no-restore
40-
41-
- name: Test
42-
run: dotnet test ./src/AzureFunctions.SqlBinding/AzureFunctions.SqlBinding.csproj --no-restore --verbosity normal
43-
44-
- name: Publish NuGet
45-
uses: brandedoutcast/[email protected]
46-
with:
47-
PROJECT_FILE_PATH: ./src/AzureFunctions.SqlBinding/AzureFunctions.SqlBinding.csproj
48-
VERSION_STATIC: ${{ steps.gitversion.outputs.nuGetVersion }}-${{ steps.gitversion.outputs.CommitsSinceVersionSourcePadded }}
49-
NUGET_KEY: ${{secrets.NUGET_KEY}}
50-
1+
name: Build, Test & Release to Nuget from master branch
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Fetch all history for all tags and branches
14+
run: git fetch --unshallow || true
15+
16+
- name: Install GitVersion
17+
uses: gittools/actions/gitversion/[email protected]
18+
with:
19+
versionSpec: "5.x"
20+
21+
- name: Use GitVersion
22+
id: gitversion # step id used as reference for output values
23+
uses: gittools/actions/gitversion/[email protected]
24+
25+
- run: |
26+
echo "NuGetVersion: ${{ steps.gitversion.outputs.nuGetVersion }}"
27+
echo "NuGetPreReleaseTagV2: ${{ steps.gitversion.outputs.CommitsSinceVersionSourcePadded }}"
28+
29+
- name: Setup .NET Core
30+
uses: actions/setup-dotnet@v1
31+
with:
32+
dotnet-version: 3.1.301
33+
34+
- name: Install dependencies
35+
run: dotnet restore ./src/AzureFunctions.SqlBinding/AzureFunctions.SqlBinding.csproj
36+
37+
- name: Build
38+
run: dotnet build ./src/AzureFunctions.SqlBinding/AzureFunctions.SqlBinding.csproj --configuration Release --no-restore
39+
40+
- name: Test
41+
run: dotnet test ./src/AzureFunctions.SqlBinding/AzureFunctions.SqlBinding.csproj --no-restore --verbosity normal
42+
43+
- name: Publish NuGet
44+
uses: brandedoutcast/[email protected]
45+
with:
46+
PROJECT_FILE_PATH: ./src/AzureFunctions.SqlBinding/AzureFunctions.SqlBinding.csproj
47+
VERSION_STATIC: ${{ steps.gitversion.outputs.nuGetVersion }}-${{ steps.gitversion.outputs.CommitsSinceVersionSourcePadded }}
48+
NUGET_KEY: ${{secrets.NUGET_KEY}}

0 commit comments

Comments
 (0)