Skip to content

Updated library to support long IDs #15

Updated library to support long IDs

Updated library to support long IDs #15

name: Publish Nuget Package
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
env:
API_KEY: ${{ secrets.NUGET_PACKAGES_GITHUB_API_KEY }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Set Environment Variables
uses: ./.github/actions/setvars
with:
varFilePath: ./.github/variables/version.env
- name: Set package version
run: |
if [[ $GITHUB_REF == 'refs/heads/main' && $GITHUB_EVENT_NAME == 'push' ]]; then
echo "VERSION=${{ env.VERSION }}.${{ github.run_number}}" >> "$GITHUB_ENV"
else
echo "VERSION=${{ env.VERSION }}.${{ github.run_number}}-beta" >> "$GITHUB_ENV"
fi
- name: Package
working-directory: BccCode.Tripletex.Client
run: |
dotnet pack -p:PackageVersion=${{ env.VERSION }} -c Release -o . BccCode.Tripletex.Client.csproj -p:GeneratePackageOnBuild=false
- name: Publish
working-directory: BccCode.Tripletex.Client
run: |
dotnet nuget push BccCode.Tripletex.Client*.nupkg -k ${{env.API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate