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
33 changes: 17 additions & 16 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
changelog:
exclude:
labels:
- ci
- good first issue
- help wanted
- invalid
- question
categories:
- title: Bugfixes
labels:
- bug
- title: New Backports
labels:
- request
- title: Other changes
labels:
- '*'
labels:
- ci
- good first issue
- help wanted
- invalid
- question
categories:
- title: Bugfixes
labels:
- bug
- title: New Backports
labels:
- request
- title: Other changes
labels:
- "*"

182 changes: 90 additions & 92 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,92 +1,90 @@
name: Build

on:
workflow_call:
inputs:
version:
required: true
type: string
no-suffix:
type: boolean
default: false


defaults:
run:
shell: pwsh

env:
DOTNET_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
NUGET_PACKAGES: ${{github.workspace}}/artifacts/pkg

jobs:
build:
runs-on: ubuntu-latest
name: Build
env:
VersionSuffix: ${{ !inputs.no-suffix && inputs.version }}
DoNotAddSuffix: ${{ inputs.no-suffix && '1' }}
ContinuousIntegrationBuild: true
steps:
- name: Configure git
run: |
git config --global core.autocrlf input

- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
submodules: recursive

# TODO: maybe we can eventually use package locks for package caching?

- name: Install .NET SDK
uses: nike4613/install-dotnet@533307d1c90c37993c8ef1397388bc9783e7b87c
with:
global-json: global.json

# NOTE: manual package caching
- name: Cache restored NuGet packages
uses: actions/cache@v4
with:
path: ${{ env.NUGET_PACKAGES }}
key: ${{ runner.os }}-nuget-v1-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets', 'nuget.config', 'global.json') }}
restore-keys: ${{ runner.os }}-nuget-v1-

- name: Restore
run: dotnet restore -bl:restore.binlog -noAutoRsp

- name: Build
run: dotnet build --no-restore -c Release -bl:build.binlog -clp:NoSummary -noAutoRsp

- name: Pack
run: dotnet pack --no-restore -c Release -bl:pack.binlog -clp:NoSummary -noAutoRsp


# TODO: if/when we add tests, run them here and hook up test reporting
#- name: Run auxiliary tests
# run: dotnet test --no-build -c Release -l:"trx;LogFileName=$($env:LOG_FILE_NAME)"
#
#- name: Upload test results
# uses: actions/upload-artifact@v4
# if: ${{ always() }}
# with:
# name: test-results aux ${{ runner.os }}
# retention-days: 1
# path: 'TestResults/*.trx'
# if-no-files-found: ignore

- name: Upload binlogs
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: binlogs-${{ runner.os }}
path: '*.binlog'
retention-days: 7

- name: Archive packages
uses: actions/upload-artifact@v4
with:
name: packages
path: artifacts/package/release/*.nupkg
name: Build

on:
workflow_call:
inputs:
version:
required: true
type: string
no-suffix:
type: boolean
default: false

defaults:
run:
shell: pwsh

env:
DOTNET_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
NUGET_PACKAGES: ${{github.workspace}}/artifacts/pkg

jobs:
build:
runs-on: ubuntu-latest
name: Build
env:
VersionSuffix: ${{ !inputs.no-suffix && inputs.version }}
DoNotAddSuffix: ${{ inputs.no-suffix && '1' }}
ContinuousIntegrationBuild: true
steps:
- name: Configure git
run: |
git config --global core.autocrlf input

- name: Checkout
uses: actions/checkout@v6
with:
lfs: true
submodules: recursive

# TODO: maybe we can eventually use package locks for package caching?

- name: Install .NET SDK
uses: nike4613/install-dotnet@533307d1c90c37993c8ef1397388bc9783e7b87c
with:
global-json: global.json

# NOTE: manual package caching
- name: Cache restored NuGet packages
uses: actions/cache@v5
with:
path: ${{ env.NUGET_PACKAGES }}
key: ${{ runner.os }}-nuget-v1-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets', 'nuget.config', 'global.json') }}
restore-keys: ${{ runner.os }}-nuget-v1-

- name: Restore
run: dotnet restore -bl:restore.binlog -noAutoRsp

- name: Build
run: dotnet build --no-restore -c Release -bl:build.binlog -clp:NoSummary -noAutoRsp

- name: Pack
run: dotnet pack --no-restore -c Release -bl:pack.binlog -clp:NoSummary -noAutoRsp

# TODO: if/when we add tests, run them here and hook up test reporting
#- name: Run auxiliary tests
# run: dotnet test --no-build -c Release -l:"trx;LogFileName=$($env:LOG_FILE_NAME)"
#
#- name: Upload test results
# uses: actions/upload-artifact@v4
# if: ${{ always() }}
# with:
# name: test-results aux ${{ runner.os }}
# retention-days: 1
# path: 'TestResults/*.trx'
# if-no-files-found: ignore

- name: Upload binlogs
uses: actions/upload-artifact@v6
if: ${{ always() }}
with:
name: binlogs-${{ runner.os }}
path: "*.binlog"
retention-days: 7

- name: Archive packages
uses: actions/upload-artifact@v6
with:
name: packages
path: artifacts/package/release/*.nupkg
32 changes: 16 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI
on:
push:
pull_request:

defaults:
run:
shell: pwsh
Expand All @@ -13,7 +13,7 @@ env:
NUGET_PACKAGES: ${{github.workspace}}/artifacts/pkg

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

jobs:
Expand All @@ -27,20 +27,20 @@ jobs:
ver: ${{ steps.computever.outputs.ver }}
checkid: ${{ steps.result_check.outpus.check_id }}
steps:
- name: Check if this run should be skipped
id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
cancel_others: true
concurrent_skipping: same_content_newer

- name: Check if this run is skipped by commit message
id: msg_check
run: echo "skip=${{ github.event_name == 'push' && contains(github.event.head_commit.message, '[skip-ci]') }}" >> $env:GITHUB_OUTPUT
- name: Compute Version
id: computever
run: echo "ver=$(Get-Date -Format y.M.d).${{ github.run_number }}.${{ github.run_attempt }}" >> $env:GITHUB_OUTPUT
- name: Check if this run should be skipped
id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
cancel_others: true
concurrent_skipping: same_content_newer

- name: Check if this run is skipped by commit message
id: msg_check
run: echo "skip=${{ github.event_name == 'push' && contains(github.event.head_commit.message, '[skip-ci]') }}" >> $env:GITHUB_OUTPUT

- name: Compute Version
id: computever
run: echo "ver=$(Get-Date -Format y.M.d).${{ github.run_number }}.${{ github.run_attempt }}" >> $env:GITHUB_OUTPUT

build:
needs: [setup]
Expand Down
Loading