|
7 | 7 | branches: [ master ]
|
8 | 8 |
|
9 | 9 | jobs:
|
10 |
| - build: |
11 |
| - |
| 10 | + continuous-delivery: |
| 11 | + name: Continuous Delivery |
12 | 12 | runs-on: ubuntu-latest
|
13 |
| - |
14 | 13 | steps:
|
15 |
| - - uses: actions/checkout@v3 |
| 14 | + - name: Checkout |
| 15 | + uses: actions/checkout@v3 |
| 16 | + with: |
| 17 | + fetch-depth: 0 |
16 | 18 | - name: Setup .NET
|
17 | 19 | uses: actions/setup-dotnet@v2
|
18 | 20 | with:
|
|
23 | 25 | run: dotnet build --no-restore
|
24 | 26 | - name: Test
|
25 | 27 | 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 | + |
| 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' |
0 commit comments