gets version from tag #55
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
- "v*" | |
workflow_dispatch: | |
env: | |
NUGET_DIR: '${{ github.workspace }}/nuget' | |
jobs: | |
publish-pkg: | |
name: Build - Release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get Version | |
id: version | |
uses: battila7/get-version-action@v2 | |
- 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: Pack Blazor.Diagrams | |
working-directory: src/Blazor.Diagrams | |
run: 'dotnet pack -p:GeneratePackageOnBuild=false --configuration Release -p:PackageVersion=${{ steps.version.outputs.version-without-v }} --output ${{ env.NUGET_DIR }}' | |
- name: Push | |
run: >- | |
for i in $(find ${{ env.NUGET_DIR }} -type f -name "*.nupkg"); | |
do | |
echo "File: ${i} \n"; | |
done |