Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
TSRBerry committed Apr 20, 2024
1 parent d04155f commit 33447f4
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Perform checks

on:
workflow_call:
pull_request:
paths:
- '**'
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release NuGet package

on:
push:
tags:
- "v*"

concurrency:
group: nuget-release
cancel-in-progress: true

jobs:
checks:
uses: ./.github/workflows/checks.yml
permissions:
pull-requests: write
checks: write

tests:
uses: ./.github/workflows/tests.yml

publish:
needs: [checks, tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-dotnet@v4
with:
global-json-file: global.json

- name: Package
working-directory: RyuSocks
run: dotnet pack

- name: Publish to NuGet.org
working-directory: RyuSocks
run: dotnet nuget push "bin/Release/RyuSocks.*.nupkg" --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json
1 change: 1 addition & 0 deletions .github/workflows/test.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Run tests

on:
workflow_call:
pull_request:

concurrency:
Expand Down

0 comments on commit 33447f4

Please sign in to comment.