diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml index 58cfbb9..4e57440 100644 --- a/.github/workflows/nuget.yml +++ b/.github/workflows/nuget.yml @@ -1,27 +1,24 @@ name: NuGet Package Creation on: - workflow_dispatch: push: tags: - "v[0-9]+.[0-9]+.[0-9]" -env: - token: ${{ secrets.NUGET_TOKEN }} - jobs: build: runs-on: ubuntu-latest timeout-minutes: 15 steps: - name: Checkout - uses: actions/checkout@v2 - - name: Set VERSION variable from env.version + uses: actions/checkout@v3 + - name: Set VERSION variable variable from tag run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV - - - uses: ./.github/actions/build-package - with: - packageId: Meadow.GnssTracker - path: Source/GNSS_Tracker/GnssTracker/GnssTracker.csproj - version: ${VERSION} - token: ${{ env.token }} + - name: Build + run: dotnet build -c Release ./Source/GnssTracker/GnssTracker.csproj /p:Version=${VERSION} + - name: Pack + run: dotnet pack -c Release ./Source/GnssTracker/GnssTracker.csproj /p:Version=${VERSION} --output . + - name: Push + run: dotnet nuget push Meadow.GnssTracker.${VERSION}.nupkg -s https://api.nuget.org/v3/index.json -k ${NUGET_TOKEN} + env: + NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}