Skip to content

Merge pull request #5 from plaberge/NHLAPIChange #54

Merge pull request #5 from plaberge/NHLAPIChange

Merge pull request #5 from plaberge/NHLAPIChange #54

Workflow file for this run

# This is a basic workflow to help you get started with Actions
#
name: NHLStats_Pkg_Build
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# - uses: nuget/setup-nuget@v1
# with:
# nuget-api-key: ${{ secrets.NuGetAPIKey}}
# nuget-version: '4.3.0'
# - name: NuGet Restore
# run: nuget restore NHLStats.sln
- name: Run Git2SemVer
run: echo "SEM_VER=$(npx -q git2semver)" >> $GITHUB_ENV
- name: Echo version variable
run: echo $SEM_VER
# run: npx -q git2semver --formatter majorminorpatch-pipelines-variables-and-label
# - name: NuGet Restore
# run: nuget restore NHLStats.sln
- name: Restore Dependencies
run: dotnet restore
working-directory: ./NHLStats/NHLStats
- name: Build
run: dotnet build --configuration Release /p:Version=${SEM_VER}
working-directory: ./NHLStats/NHLStats
# Runs a set of commands using the runners shell
- name: Pack
run: dotnet pack --configuration Release /p:Version=${SEM_VER} --no-build --output .
working-directory: ./NHLStats/NHLStats
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Push
run: dotnet nuget push NHLStats.${SEM_VER}.nupkg -k ${NUGETAPIKEY} -s https://api.nuget.org/v3/index.json
env:
NUGETAPIKEY: ${{ secrets.NUGETAPIKEY }}
working-directory: ./NHLStats/NHLStats
# with:
# NUGETAPIKEY: ${{ secrets.NUGETAPIKEY }}
# run: dotnet nuget push NHLStats.${SEM_VER}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGETAPIKEY}
# working-directory: ./NHLStats
# env:
# NUGETAPIKEY: ${{ secrets.NUGETAPIKEY }}