Skip to content

Blazor.Cherrydown Packages #6

Blazor.Cherrydown Packages

Blazor.Cherrydown Packages #6

Workflow file for this run

name: Blazor.Cherrydown Packages
on:
workflow_dispatch:
env:
Configuration: Release
ArtifactsName: Blazor_Cherrydown_Nuget_Package
dotnet-version: "8.0.x"
nuget_feed_source: 'https://api.nuget.org/v3/index.json'
jobs:
build:
name: Build packages
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Set VERSION variable
run: |
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
TAG_NAME=${{ github.ref }} # e.g., refs/tags/3.0.0
TAG_NAME=${TAG_NAME#refs/tags/} # remove the refs/tags/ prefix
echo "VERSION=${TAG_NAME}" >> $GITHUB_ENV
else
echo "VERSION=0.1.${{github.run_number}}" >> $GITHUB_ENV
fi
- name: Restore
run: dotnet restore
- name: Build Package
run: dotnet pack Blazor.Cherrydown/Blazor.Cherrydown.csproj /p:Version=${VERSION} -c ${{ env.Configuration }} -o packages -v m --no-restore
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.ArtifactsName }}
path: packages/*nupkg