Skip to content

Commit

Permalink
CI/CD: Use shorter SourceRevisionId as a value of InformationalVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfeeddeadbeef committed Apr 10, 2022
1 parent 5b527cc commit 5131d9b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ on:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_MULTILEVEL_LOOKUP: 1
DOTNET_DISABLE_GUI_ERRORS: 1
DOTNET_GENERATE_ASPNET_CERTIFICATE: 0
DOTNET_NOLOGO: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1

steps:
- name: Checkout
Expand All @@ -34,12 +39,15 @@ jobs:
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
include-prerelease: false

- name: Restore
run: dotnet restore --disable-parallel -p:Configuration=Release
run: dotnet restore -p:Configuration=Release

- name: Build
run: dotnet build -c Release --no-restore
run: |
dotnet build -c Release --no-restore -p:SourceRevisionId=$(git rev-parse --short $GITHUB_SHA)
- name: Test
run: dotnet test -c Release --no-restore --no-build --verbosity normal
# There are no tests yet.
#- name: Test
# run: dotnet test -c Release --no-restore --no-build --verbosity normal
18 changes: 12 additions & 6 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@ on:
jobs:
build:
runs-on: windows-latest
defaults:
run:
shell: pwsh
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_MULTILEVEL_LOOKUP: 1
DOTNET_DISABLE_GUI_ERRORS: 1
DOTNET_GENERATE_ASPNET_CERTIFICATE: 0
DOTNET_NOLOGO: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1

steps:
- name: Checkout
Expand All @@ -41,13 +46,14 @@ jobs:
nuget-api-key-source: 'https://api.nuget.org/v3/index.json'

- name: Restore
run: dotnet restore --disable-parallel -p:Configuration=Release
run: dotnet restore -p:Configuration=Release

- name: Build
run: dotnet build -c Release --no-restore
run: dotnet build -c Release --no-restore -p:SourceRevisionId=$(git rev-parse --short $env:GITHUB_SHA)

- name: Test
run: dotnet test -c Release --no-restore --no-build --verbosity normal
# There are no tests yet.
#- name: Test
# run: dotnet test -c Release --no-restore --no-build --verbosity normal

- name: Push Jws
run: nuget push "src\TBC.OpenBanking.Jws\src\bin\Release\*.nupkg" -NonInteractive -SkipDuplicate -Source "https://api.nuget.org/v3/index.json" -NoSymbols -ForceEnglishOutput
Expand Down

0 comments on commit 5131d9b

Please sign in to comment.