Skip to content
Draft
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
62 changes: 62 additions & 0 deletions .github/workflows/preview-nugets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Preview NuGet packages

on:
push:
branches:
- "ci/**"
- "feat/**"
- "fix/**"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
meta:
uses: ./.github/workflows/part-compute-version.yml
secrets: inherit
with:
prereleaseSlug: preview

build-nuget:
runs-on: ubuntu-latest
needs: meta

env:
COALESCE_VERSION: ${{ needs.meta.outputs.COALESCE_VERSION }}

steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-dotnet
- uses: ./.github/actions/setup-js
- run: dotnet restore
- run: dotnet build --no-restore --configuration Release /WarnAsError
- run: dotnet pack --no-build --configuration Release -p:PackageOutputPath="$(pwd)/out/packages"

- name: Upload NuGet packages artifact
uses: actions/upload-artifact@v7
with:
name: packages
path: out/packages

publish-nuget:
runs-on: ubuntu-latest
needs: [build-nuget]
permissions:
contents: read
packages: write

steps:
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x

- name: Download NuGet packages artifact
uses: actions/download-artifact@v8
with:
name: packages
path: out/packages

- name: Push packages to GitHub Packages
run: dotnet nuget push "out/packages/*.nupkg" --source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" --api-key ${{ github.token }} --skip-duplicate
Loading