diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml
new file mode 100644
index 0000000..f3c9fa8
--- /dev/null
+++ b/.github/workflows/create-release.yml
@@ -0,0 +1,72 @@
+################################################################################
+### Build AsepriteDotNet (Release)
+### Builds, tests, and packs the AsepriteDotNet source libraries.
+### Once the build job finishes, the deploy job uploads the nupkg files to NuGet.
+###
+### - Can be triggered manually with workflow_dispatch
+### - Allows specifying a branch (defaults to develop)
+### - Version numbers are determined by the project properties on the branch
+################################################################################
+name: "Create Release"
+
+on:
+ workflow_dispatch:
+ inputs:
+ branch:
+ description: 'Branch to build from (e.g., main, develop)'
+ required: true
+ type: string
+ default: 'develop'
+
+jobs:
+ build:
+ name: "Build AsepriteDotNet"
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Clone Repository
+ uses: actions/checkout@v4
+ with:
+ ref: ${{ inputs.branch }}
+
+ - name: Setup Dotnet
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 8.0.x
+
+ - name: Build AsepriteDotNet
+ run: dotnet build source/AsepriteDotNet/AsepriteDotNet.csproj --nologo --verbosity minimal --configuration Release
+
+ - name: Test AsepriteDotNet
+ run: dotnet test tests/AsepriteDotNet.Tests/AsepriteDotNet.Tests.csproj --nologo --verbosity minimal --configuration Release
+
+ - name: Pack AsepriteDotNet
+ run: dotnet pack source/AsepriteDotNet/AsepriteDotNet.csproj --nologo --verbosity minimal --configuration Release
+
+ - name: Upload Artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: build-artifacts
+ path: ./.artifacts/src/**/*.nupkg
+
+ deploy:
+ name: "Deploy NuGets"
+ runs-on: ubuntu-latest
+ needs: [ build ]
+ permissions:
+ contents: write
+
+ steps:
+ - name: Download Artifacts
+ uses: actions/download-artifact@v4
+ with:
+ name: build-artifacts
+ path: ./.artifacts
+
+ - name: Push Packages to NuGet
+ env:
+ NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
+ run: |
+ for PACKAGE in .artifacts/**/*.nupkg; do
+ dotnet nuget push "$PACKAGE" --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key "$NUGET_API_KEY"
+ done
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
deleted file mode 100644
index 80ff91a..0000000
--- a/.github/workflows/main.yml
+++ /dev/null
@@ -1,62 +0,0 @@
-name: Build AsepriteDotNet
-
-on:
- pull_request:
- branches: [ develop, main ]
- push:
- branches: [ main ]
- tags:
- - 'v*'
-
-jobs:
- build:
- name: Build
- runs-on: ubuntu-latest
-
- steps:
- - name: Expose GitHub Runtime
- uses: crazy-max/ghaction-github-runtime@v3
-
- - name: Clone Repository
- uses: actions/checkout@v4
-
- - name: Setup .NET
- uses: actions/setup-dotnet@v4
- with:
- dotnet-version: 8.0.x
-
- - name: Build
- run: dotnet run --project build/AsepriteDotNet.Build.csproj -- --target=Default
-
- - name: Upload Artifacts
- run: dotnet run --project build/AsepriteDotNet.Build.csproj -- --target=UploadArtifacts
- env:
- ACTIONS_RUNTIME_TOKEN: ${{ env.ACTIONS_RUNTIME_TOKEN }}
- ACTIONS_RUNTIME_URL: "${{ env.ACTIONS_RUNTIME_URL }}"
-
- deploy-to-nuget:
- name: Deploy To NuGet
- needs: [ build ]
- runs-on: ubuntu-latest
- if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
- permissions:
- packages: write
- contents: write
- steps:
- - name: Expose GitHub Runtime
- uses: crazy-max/ghaction-github-runtime@v3
-
- - name: Clone Repository
- uses: actions/checkout@v4
-
- - name: Setup .NET
- uses: actions/setup-dotnet@v4
- with:
- dotnet-version: '8.0.x'
-
- - name: Push NuGets
- run: dotnet run --project build/AsepriteDotNet.Build.csproj -- --target=DeployNuGets
- env:
- ACTIONS_RUNTIME_TOKEN: ${{ env.ACTIONS_RUNTIME_TOKEN }}
- ACTIONS_RUNTIME_URL: "${{ env.ACTIONS_RUNTIME_URL }}"
- NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml
new file mode 100644
index 0000000..8d4e7da
--- /dev/null
+++ b/.github/workflows/pull-requests.yml
@@ -0,0 +1,27 @@
+################################################################################
+### Pull Request Validation
+### Runs unit tests on pull requests targeting the develop branch.
+################################################################################
+name: "Pull Request Validation"
+
+on:
+ pull_request:
+ branches:
+ - develop
+
+jobs:
+ test:
+ name: "Run Tests"
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Clone Repository
+ uses: actions/checkout@v4
+
+ - name: Setup Dotnet
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 8.0.x
+
+ - name: Test AsepriteDotNet
+ run: dotnet test tests/AsepriteDotNet.Tests/AsepriteDotNet.Tests.csproj --nologo --verbosity minimal --configuration Release
diff --git a/Directory.Build.props b/Directory.Build.props
index 485c28d..f5f25fd 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -20,7 +20,7 @@
en
enable
enable
- 1.9.0
+ 1.9.1