Skip to content

alternative tag extraction using battila action #38

alternative tag extraction using battila action

alternative tag extraction using battila action #38

Workflow file for this run

name: Create release
# On push to master branch. i.e. when we merge a PR.
on:
push:
branches: [ master, VFL/WI00764279/NCN-Diagrams-Move-WTG.Blazor.Diagrams-to-nuget.org ]
tags:
- "*"
workflow_dispatch:
env:
PACKAGE_PATH: /home/runner/work/Blazor.Diagrams/Blazor.Diagrams/src/Blazor.Diagrams/bin/Release/*.nupkg
jobs:
publish-pkg:
name: Build - Release
runs-on: ubuntu-latest
steps:
- name: Extract Version
id: version
uses: battila/get-version-action@v2
- name: Checkout
uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
3.1.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release
- name: Create NuGet Packages
run: dotnet pack --configuration Release /p:CommitID=${{ github.sha }} /p:TagVersion=${{ steps.version.outputs.version-without-v }}
# Upload package as an atrifact to the GitHub action
- name: Upload packages
uses: actions/upload-artifact@v3
with:
name: package
path: ${{ env.PACKAGE_PATH }}
retention-days: 5
# - name: Publish NuGet Package to NuGet Gallery
# run: |
# nuget setapikey ${{ secrets.NUGET_API_KEY }}
# nuget push bin/WTG.Z.Blazor.Diagrams.${{ steps.tag_name.outputs.result }}.nupkg -Source https://api.nuget.org/v3/index.json