mirror of https://github.com/ppy/SDL3-CS.git
47 lines
1.5 KiB
YAML
47 lines
1.5 KiB
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
pack:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: 8.0.x
|
|
|
|
- name: Setup JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: microsoft
|
|
java-version: 17
|
|
|
|
- name: Setup Android SDK
|
|
uses: android-actions/setup-android@v3
|
|
|
|
- name: Install .NET workloads
|
|
run: dotnet workload restore
|
|
|
|
- name: Build & pack
|
|
run: |
|
|
dotnet pack SDL3-CS/SDL3-CS.csproj -c Release /p:Version=$(git describe --exact-match --tags HEAD) -o artifacts
|
|
dotnet pack SDL3_image-CS/SDL3_image-CS.csproj -c Release /p:Version=$(git describe --exact-match --tags HEAD) -o artifacts
|
|
dotnet pack SDL3_ttf-CS/SDL3_ttf-CS.csproj -c Release /p:Version=$(git describe --exact-match --tags HEAD) -o artifacts
|
|
dotnet pack SDL3_mixer-CS/SDL3_mixer-CS.csproj -c Release /p:Version=$(git describe --exact-match --tags HEAD) -o artifacts
|
|
dotnet pack SDL3_shadercross-CS/SDL3_shadercross-CS.csproj -c Release /p:Version=$(git describe --exact-match --tags HEAD) -o artifacts
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Packages
|
|
path: artifacts/ppy.*.nupkg
|
|
|
|
- name: Publish tagged release to nuget.org
|
|
run: dotnet nuget push artifacts/ppy.*.nupkg -s https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}}
|