Skip to content

Commit

Permalink
Merge pull request #130 from dragonfruitnetwork/use-shared-action
Browse files Browse the repository at this point in the history
use shared action (uses linux runners)
  • Loading branch information
aspriddell authored Sep 16, 2022
2 parents 6acc74f + e70f822 commit 6889842
Showing 1 changed file with 5 additions and 32 deletions.
37 changes: 5 additions & 32 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,11 @@
name: Publish

name: Publish

on:
release:
types: [ published ]

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PowerShell Policy
run: Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force

- name: Install .NET 6
run: choco install dotnet-sdk

- name: Restore
run: dotnet restore

- name: Build
run: dotnet build -c Release -v normal -p:Version=${{ github.ref_name }}

- name: Pack (Beta)
run: dotnet pack -c Release --include-symbols --no-build -v normal -o $env:GITHUB_WORKSPACE -p:PackageVersion=${{ github.ref_name }}-beta
if: "github.event.release.prerelease"

- name: Pack (Stable)
run: dotnet pack -c Release --include-symbols --no-build -v normal -o $env:GITHUB_WORKSPACE -p:PackageVersion=${{ github.ref_name }}
if: "!github.event.release.prerelease"

- name: Publish
run: |
cd $env:GITHUB_WORKSPACE
dotnet nuget push "*.nupkg" -k ${{ secrets.NUGET_KEY }} --skip-duplicate -s https://api.nuget.org/v3/index.json
deploy:
secrets: inherit
uses: dragonfruitnetwork/workflows/.github/workflows/nuget-publish.yml@master

0 comments on commit 6889842

Please sign in to comment.