-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from WildernessLabs/develop
Update nuget.yml
- Loading branch information
Showing
1 changed file
with
10 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |