Merge pull request #145 from IndicoDataSolutions/nate/update_docker #40
Workflow file for this run
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
name: publish to nuget | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
publish: | |
name: build, pack & publish | |
runs-on: ubuntu-latest | |
env: | |
Configuration: Release | |
BuildType: V2 | |
BuildNumber: ${{ github.run_number }} | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- uses: olegtarasov/[email protected] | |
id: tagName | |
- name: Set Version | |
run: echo "Version=${{ env.GIT_TAG_NAME }}" | cut -c1-8,10- >> $GITHUB_ENV | |
- name: Set NugetFile | |
run: echo "NugetFile=./IndicoV2/bin/Release/IndicoClient.${{ env.Version }}.nupkg" >> $GITHUB_ENV | |
- uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 5.0.202 | |
- name: Pack | |
run: dotnet pack ./IndicoV2/IndicoV2.csproj | |
# - name: 'Upload Artifact' | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: Nuget Package | |
# path: ${{ env.NugetFile }} | |
# retention-days: 1 | |
# if-no-files-found: error | |
- name: Push | |
run: dotnet nuget push ${{ env.NugetFile }} -s https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} | |