NuGet Publishing Infrastructure #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2025 Cesium contributors <https://github.com/ForNeVeR/Cesium> | |
# | |
# SPDX-License-Identifier: MIT | |
name: Release | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 0' | |
jobs: | |
main: | |
runs-on: ${{ matrix.environment }} | |
strategy: | |
matrix: | |
environment: | |
- macos-latest | |
- ubuntu-latest | |
- windows-latest | |
fail-fast: false | |
env: | |
DOTNET_NOLOGO: 1 | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
NUGET_PACKAGES: ${{ github.workspace }}/.github/nuget-packages | |
steps: | |
- name: π Fetch Sources π | |
uses: actions/checkout@v4 | |
- name: π‘ Perform Common Steps π‘ | |
uses: ./.github/workflows/perform-common-steps | |
- name: π¦ Pack Everything π¦ | |
shell: bash | |
run: dotnet nuke PackAllCompilerRuntimeSpecificBundles PackCompilerNuPkg PackSdk PackTemplates --configuration Release | |
- id: version | |
name: π Get Version π | |
shell: pwsh | |
run: echo "version=$(scripts/Get-Version.ps1 -RefName $env:GITHUB_REF)" >> $env:GITHUB_OUTPUT | |
- name: β Upload Compiler β | |
uses: actions/upload-artifact@v4 | |
if: runner.os == 'Linux' | |
with: | |
if-no-files-found: 'error' | |
path: |- | |
./artifacts/package/release/Cesium.Compiler.${{ steps.version.outputs.version }}.nupkg | |
./artifacts/package/release/Cesium.Compiler.${{ steps.version.outputs.version }}.snupkg | |
./artifacts/package/release/Cesium.Compiler.linux-arm64.${{ steps.version.outputs.version }}.zip | |
./artifacts/package/release/Cesium.Compiler.linux-x64.${{ steps.version.outputs.version }}.zip | |
./artifacts/package/release/Cesium.Compiler.osx-arm64.${{ steps.version.outputs.version }}.zip | |
./artifacts/package/release/Cesium.Compiler.osx-x64.${{ steps.version.outputs.version }}.zip | |
./artifacts/package/release/Cesium.Compiler.win-arm64.${{ steps.version.outputs.version }}.zip | |
./artifacts/package/release/Cesium.Compiler.win-x64.${{ steps.version.outputs.version }}.zip | |
./artifacts/package/release/Cesium.Compiler.win-x86.${{ steps.version.outputs.version }}.zip | |
- name: β Upload Runtime β | |
uses: actions/upload-artifact@v4 | |
if: runner.os == 'Linux' | |
with: | |
if-no-files-found: 'error' | |
path: |- | |
./artifacts/package/release/Cesium.Runtime.${{ steps.version.outputs.version }}.nupkg | |
./artifacts/package/release/Cesium.Runtime.${{ steps.version.outputs.version }}.snupkg | |
- name: β Upload SDK β | |
uses: actions/upload-artifact@v4 | |
if: runner.os == 'Linux' | |
with: | |
if-no-files-found: 'error' | |
path: |- | |
./artifacts/package/release/Cesium.Sdk.${{ steps.version.outputs.version }}.nupkg | |
./artifacts/package/release/Cesium.Sdk.${{ steps.version.outputs.version }}.snupkg | |
- name: β Upload Templates β | |
uses: actions/upload-artifact@v4 | |
if: runner.os == 'Linux' | |
with: | |
if-no-files-found: 'error' | |
path: |- | |
./artifacts/package/release/Cesium.Templates.${{ steps.version.outputs.version }}.nupkg | |
./artifacts/package/release/Cesium.Templates.${{ steps.version.outputs.version }}.snupkg | |
#- name: β Publish to NuGet β | |
# # TODO |