Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
226 changes: 0 additions & 226 deletions .github/workflows/benchmark.yml

This file was deleted.

18 changes: 13 additions & 5 deletions .github/workflows/package-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
description: Push the packed NuGet to NuGet.org
type: boolean
default: false
workflow_call: # called by release.yml to publish alongside the other packages
inputs:
publish:
type: boolean
default: false
push:
tags:
- 'native-v*'
Expand Down Expand Up @@ -111,20 +116,23 @@ jobs:

- name: Resolve package version
id: ver
# native-vX.Y.Z tag -> X.Y.Z (a release); otherwise a CI prerelease.
# tag native-vX.Y.Z -> X.Y.Z; publish (dispatch/release call) -> the csproj <Version>;
# PR smoke test -> a throwaway CI prerelease.
run: |
ref='${{ github.ref }}'
if [[ "$ref" == refs/tags/native-v* ]]; then
echo "version=${ref#refs/tags/native-v}" >> "$GITHUB_OUTPUT"
echo "args=-p:Version=${ref#refs/tags/native-v}" >> "$GITHUB_OUTPUT"
elif [[ "${{ inputs.publish }}" == "true" ]]; then
echo "args=" >> "$GITHUB_OUTPUT"
else
echo "version=0.1.0-ci.${{ github.run_number }}" >> "$GITHUB_OUTPUT"
echo "args=-p:Version=0.0.0-ci.${{ github.run_number }}" >> "$GITHUB_OUTPUT"
fi

- name: Pack
run: >
dotnet pack bindings/dotnet/Glyph11.Native/Glyph11.Native.csproj
-c Release -p:ContinuousIntegrationBuild=true
-p:Version=${{ steps.ver.outputs.version }}
${{ steps.ver.outputs.args }}
-o artifacts

- name: Upload package
Expand All @@ -140,7 +148,7 @@ jobs:
name: Publish to NuGet.org
needs: pack
# Only on a native-v* tag, or an explicit dispatch with publish=true.
if: startsWith(github.ref, 'refs/tags/native-v') || (github.event_name == 'workflow_dispatch' && inputs.publish)
if: startsWith(github.ref, 'refs/tags/native-v') || ((github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.publish)
runs-on: ubuntu-latest
environment:
name: production
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/package-pico.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
description: Push the packed NuGet to NuGet.org
type: boolean
default: false
workflow_call: # called by release.yml to publish alongside the other packages
inputs:
publish:
type: boolean
default: false
push:
tags:
- 'pico-v*'
Expand Down Expand Up @@ -111,20 +116,23 @@ jobs:

- name: Resolve package version
id: ver
# pico-vX.Y.Z tag -> X.Y.Z (a release); otherwise a CI prerelease.
# tag pico-vX.Y.Z -> X.Y.Z; publish (dispatch/release call) -> the csproj <Version>;
# PR smoke test -> a throwaway CI prerelease.
run: |
ref='${{ github.ref }}'
if [[ "$ref" == refs/tags/pico-v* ]]; then
echo "version=${ref#refs/tags/pico-v}" >> "$GITHUB_OUTPUT"
echo "args=-p:Version=${ref#refs/tags/pico-v}" >> "$GITHUB_OUTPUT"
elif [[ "${{ inputs.publish }}" == "true" ]]; then
echo "args=" >> "$GITHUB_OUTPUT"
else
echo "version=0.0.1-ci.${{ github.run_number }}" >> "$GITHUB_OUTPUT"
echo "args=-p:Version=0.0.1-ci.${{ github.run_number }}" >> "$GITHUB_OUTPUT"
fi

- name: Pack
run: >
dotnet pack bindings/dotnet/Glyph11.Pico/Glyph11.Pico.csproj
-c Release -p:ContinuousIntegrationBuild=true
-p:Version=${{ steps.ver.outputs.version }}
${{ steps.ver.outputs.args }}
-o artifacts

- name: Upload package
Expand All @@ -140,7 +148,7 @@ jobs:
name: Publish to NuGet.org
needs: pack
# Only on a pico-v* tag, or an explicit dispatch with publish=true.
if: startsWith(github.ref, 'refs/tags/pico-v') || (github.event_name == 'workflow_dispatch' && inputs.publish)
if: startsWith(github.ref, 'refs/tags/pico-v') || ((github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.publish)
runs-on: ubuntu-latest
environment:
name: production
Expand Down
32 changes: 23 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Release

# Publishes all three NuGet packages at their csproj versions:
# Glyph11 (managed) here, and Glyph11.Native / Glyph11.Pico via their package
# workflows (which run the full native build matrices, then pack + push).
# Every push uses --skip-duplicate, so re-running only publishes versions not yet
# on NuGet.org — bump a package's <Version> and re-run to release it.
on:
workflow_dispatch:

Expand All @@ -9,15 +14,11 @@ permissions:

jobs:

publish:

name: Build & Publish Packages

managed:
name: Glyph11 (managed)
runs-on: windows-latest

environment:
name: production

steps:
- name: Checkout source
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
Expand All @@ -32,9 +33,6 @@ jobs:
9.0
10.0

- name: Setup NuGet CLI
uses: NuGet/setup-nuget@323ab0502cd38fdc493335025a96c8fdb0edc71f # v2

- name: Restore dependencies
run: dotnet restore
working-directory: src
Expand All @@ -56,3 +54,19 @@ jobs:
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push *.nupkg -k "$env:NUGET_API_KEY" -s https://api.nuget.org/v3/index.json --skip-duplicate

# Build the 6-RID native matrix, pack, and publish Glyph11.Native at its csproj version.
native:
name: Glyph11.Native
uses: ./.github/workflows/package-native.yml
with:
publish: true
secrets: inherit

# Build the 6-RID native matrix, pack, and publish Glyph11.Pico at its csproj version.
pico:
name: Glyph11.Pico
uses: ./.github/workflows/package-pico.yml
with:
publish: true
secrets: inherit
Loading
Loading