Skip to content

Commit

Permalink
Bit of cleanup, also fix checkout for submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbilas committed Nov 14, 2023
1 parent 5d2f5a4 commit a043795
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: Publish NuGet package
name: Publish NuGet Package

on:
workflow_dispatch:
push:
tags: [ 'release-*' ]

# TODO: trigger on commit desc '/publish'
# TODO: switch to https://github.com/xoofx/dotnet-releaser

jobs:
publish:
runs-on: windows-latest
Expand All @@ -21,6 +24,10 @@ jobs:
- name: Build for publish
run: dotnet publish -c Release

- name: Run tests
run: |
dotnet test --nologo -l:"console;verbosity=normal" -c Release
- name: Publish NuGet package
run: |
dotnet nuget push publish\Core\*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
21 changes: 14 additions & 7 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
name: Validate dev branch
name: Validate Dev Branch

on:
push:
# https://stackoverflow.com/questions/58139406/only-run-job-on-specific-branch-with-github-actions
branches:
- dev
branches: [ 'dev' ]

jobs:
validate:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4.1.1
- uses: actions/setup-dotnet@v3.2.0
- name: Checkout + submodules
uses: actions/checkout@v4.1.1
with:
submodules: true

- name: Setup .NET
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: '7.0.x'

# https://stackoverflow.com/a/70552262/14582
- run: dotnet test --nologo -l:"console;verbosity=normal"
- name: Run tests
run: |
dotnet test --nologo -l:"console;verbosity=normal"

0 comments on commit a043795

Please sign in to comment.