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

Update workflows for NuGet auto-push #2

Merged
merged 17 commits into from
Feb 6, 2024
34 changes: 34 additions & 0 deletions .github/workflows/dotnet-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: .NET

on:
push:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Pack
run: |
dotnet pack src/Commands -c Release --no-build
dotnet pack src/core/Commands.Hosting -c Release --no-build
- name: Publish
run: |
dotnet nuget push src/Commands/bin/Release/*.nupkg -k ${{ secrets.NUGET_TOKEN }} -n -s https://api.nuget.org/v3/index.json --skip-duplicate
dotnet nuget push src/Commands.Hosting/bin/Release/*.nupkg -k ${{ secrets.NUGET_TOKEN }} -n -s https://api.nuget.org/v3/index.json --skip-duplicate
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
name: .NET

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

Expand All @@ -19,7 +17,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/wiki-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Wiki
run-name: Wiki Update
on:
push:
branches: [ "master" ]
jobs:
update-wiki:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: csmir/wiki-sync@v1
name: Wiki Update
with:
username: csmir
access_token: ${{ secrets.GITHUB_TOKEN }}
wiki_folder: wiki
ignore_safe_warnings: true
commit_message: 'Wiki Update'
commit_username: 'contributors'
commit_email: '[email protected]'
Loading