Skip to content

Commit

Permalink
Merge pull request #15 from WildernessLabs/develop
Browse files Browse the repository at this point in the history
Update nuget.yml
  • Loading branch information
adrianstevens authored May 6, 2023
2 parents 7d5902a + 6621d1f commit dc22f4d
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit dc22f4d

Please sign in to comment.