Skip to content

Commit

Permalink
CI: Add Manual Release
Browse files Browse the repository at this point in the history
Add a manual publish workflow for when automatic releases fail
  • Loading branch information
Koenari authored Mar 3, 2024
1 parent 4e9f42d commit 9cfc9e5
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/manual-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Manual Publish (NuGet.org)
on:
workflow_dispatch:
inputs:
release-netstone:
type: boolean
required: true
version:
type: string
release-lumina:
type: boolean
required: true
lumina-version:
type: string
jobs:
publish:
runs-on: ubuntu-latest
env:
EXPECTED_VERSION: ${{inputs.version }}
EXPECTED_LUMINA_VERSION: ${{inputs.lumina-version }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --no-build --verbosity normal
- name: Package
run: dotnet pack --configuration Release --no-build
- name: Push package NetStone
if: ${{inputs.release-netstone}}
run: dotnet nuget push "**/Release/NetStone.$EXPECTED_VERSION.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
- name: Push package NetStone.GameData.Lumina
if: ${{inputs.release-lumina}}
run: dotnet nuget push "**/Release/NetStone.GameData.Lumina.$EXPECTED_LUMINA_VERSION.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

0 comments on commit 9cfc9e5

Please sign in to comment.