Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semver release TEST DO NOT MERGE #50

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# This is a basic workflow to help you get started with Actions

name: Publish to nuget.org

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
pull_request:
branches:
- master
#types: [closed]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
#if: github.event.pull_request.merged == true
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: windows-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
- uses: actions/checkout@v2

- id: bump
name: Determine version change
uses: zwaldowski/match-label-action@v1
with:
allowed: >
major
minor
patch
- id: semver
uses: zwaldowski/semver-release-action@v1
name: Create new version number for this release
with:
bump: ${{ steps.bump.outputs.match }}
github_token: ${{ secrets.GITHUB_TOKEN }}

# https://stackoverflow.com/questions/57889719/how-to-push-nuget-package-in-github-actions
- name: "Setup .NET Core @ Latest"
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.NUGET_API_KEY}}


# Runs a set of commands using the runners shell
- name: .NET pack
run: dotnet pack -c Release -o ../drop /p:Version=${{ steps.semver.outputs.version }}
shell: pwsh
working-directory: src

# - name: Push to nuget.org
# run: dotnet nuget push (Join-Path "drop" "*.nupkg") --api-key ${{secrets.NUGET_API_KEY}}
# shell: pwsh
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ jobs:
- name: Push to GitHub Packages
run: dotnet nuget push (Join-Path "drop" "*.nupkg")
shell: pwsh