Skip to content

fix(class): fixed class to not register again #14

fix(class): fixed class to not register again

fix(class): fixed class to not register again #14

on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: .
environment: prod
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0 # Ensure the full history is fetched so we can check the commit history
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.*' # Change this to the .NET version you're using
- name: Extract version from tag
run: |
TAG_NAME=$(echo $GITHUB_REF | sed 's/refs\/tags\///')
VERSION=${TAG_NAME#v}
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Pack
working-directory: ${{ env.WORKING_DIRECTORY }}
run: dotnet pack --configuration Release --output nupkgs /p:Version=$VERSION
- name: Publish NuGet packages
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
dotnet nuget push "nupkgs/*.nupkg" --api-key ${{ secrets.TEMPLATES_NUGET_API_KEY }} --source ${{ vars.TEMPLATES_NUGET_SOURCE_URL }}