release notes #40
Workflow file for this run
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
name: Release | |
on: | |
push: | |
tags: ['[0-9]+.[0-9]+.[0-9]+', '[0-9]+.[0-9]+.[0-9]+-pre[0-9]+'] | |
paths-ignore: [ 'docs/**' ] | |
permissions: write-all | |
env: | |
CONFIG: Release | |
SLN_FILE: Fabulous.Avalonia.NoSamples.sln | |
MAIN_PROJ: src/Fabulous.Avalonia/Fabulous.Avalonia.fsproj | |
AVALONIALABS_PROJ: extensions/Fabulous.Avalonia.Labs/Fabulous.Avalonia.Labs.fsproj | |
ITEMSREPEATER_PROJ: extensions/Fabulous.Avalonia.ItemsRepeater/Fabulous.Avalonia.ItemsRepeater.fsproj | |
COLORPICKER_PROJ: extensions/Fabulous.Avalonia.ColorPicker/Fabulous.Avalonia.ColorPicker.fsproj | |
DATAGRID_PROJ: extensions/Fabulous.Avalonia.DataGrid/Fabulous.Avalonia.DataGrid.fsproj | |
TREEDATAGRID_PROJ: extensions/Fabulous.Avalonia.TreeDataGrid/Fabulous.Avalonia.TreeDataGrid.fsproj | |
DIAGNOSTICS_PROJ: extensions/Fabulous.Avalonia.Diagnostics/Fabulous.Avalonia.Diagnostics.fsproj | |
TEMPLATE_PROJ: templates/Fabulous.Avalonia.Templates.proj | |
jobs: | |
release: | |
runs-on: macos-15 | |
environment: nuget | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Extract version from tag | |
uses: damienaicheh/[email protected] | |
- name: Set release version | |
run: | | |
if [ "${PRE_RELEASE}" == "" ]; then | |
RELEASE_VERSION=${MAJOR}.${MINOR}.${PATCH} | |
else | |
RELEASE_VERSION=${MAJOR}.${MINOR}.${PATCH}-${PRE_RELEASE} | |
fi | |
echo "Release version is $RELEASE_VERSION" | |
echo "RELEASE_VERSION=$RELEASE_VERSION" >> "$GITHUB_ENV" | |
- name: Get Fabulous.Avalonia.Templates Changelog Entry | |
id: templates_changelog | |
uses: mindsers/changelog-reader-action@v2 | |
with: | |
validation_level: warn | |
version: '${{ env.RELEASE_VERSION }}' | |
path: templates/CHANGELOG.md | |
- name: Get Fabulous.Avalonia Changelog Entry | |
id: fabulous_changelog | |
uses: mindsers/changelog-reader-action@v2 | |
with: | |
validation_level: warn | |
version: '${{ env.RELEASE_VERSION }}' | |
path: src/Fabulous.Avalonia/CHANGELOG.md | |
- name: Get Fabulous.Avalonia.ItemsRepeater Changelog Entry | |
id: itemsrepeater_changelog | |
uses: mindsers/changelog-reader-action@v2 | |
with: | |
validation_level: warn | |
version: '${{ env.RELEASE_VERSION }}' | |
path: extensions/Fabulous.Avalonia.ItemsRepeater/CHANGELOG.md | |
- name: Get Fabulous.Avalonia.Labs Changelog Entry | |
id: avalonialabs_changelog | |
uses: mindsers/changelog-reader-action@v2 | |
with: | |
validation_level: warn | |
version: '${{ env.RELEASE_VERSION }}' | |
path: extensions/Fabulous.Avalonia.Labs/CHANGELOG.md | |
- name: Get Fabulous.Avalonia.ColorPicker Changelog Entry | |
id: colorpicker_changelog | |
uses: mindsers/changelog-reader-action@v2 | |
with: | |
validation_level: warn | |
version: '${{ env.RELEASE_VERSION }}' | |
path: extensions/Fabulous.Avalonia.ColorPicker/CHANGELOG.md | |
- name: Get Fabulous.Avalonia.DataGrid Changelog Entry | |
id: datagrid_changelog | |
uses: mindsers/changelog-reader-action@v2 | |
with: | |
validation_level: warn | |
version: '${{ env.RELEASE_VERSION }}' | |
path: extensions/Fabulous.Avalonia.DataGrid/CHANGELOG.md | |
- name: Get Fabulous.Avalonia.TreeDataGrid Changelog Entry | |
id: treedatagrid_changelog | |
uses: mindsers/changelog-reader-action@v2 | |
with: | |
validation_level: warn | |
version: '${{ env.RELEASE_VERSION }}' | |
path: extensions/Fabulous.Avalonia.TreeDataGrid/CHANGELOG.md | |
- name: Get Fabulous.Avalonia.Diagnostics Changelog Entry | |
id: diagnostics_changelog | |
uses: mindsers/changelog-reader-action@v2 | |
with: | |
validation_level: warn | |
version: '${{ env.RELEASE_VERSION }}' | |
path: extensions/Fabulous.Avalonia.Diagnostics/CHANGELOG.md | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.x | |
- name: Install dotnet workload | |
run: dotnet workload restore | |
- name: Restore | |
run: dotnet restore ${SLN_FILE} | |
- name: Build | |
run: dotnet build ${SLN_FILE} -p:Version=${RELEASE_VERSION} -c ${CONFIG} --no-restore | |
- name: Test | |
run: dotnet test ${SLN_FILE} -p:Version=${RELEASE_VERSION} -c ${CONFIG} --no-build | |
- name: Pack | |
run: | | |
find templates -type f -name template.json | xargs sed -i bak "s/PKG_VERSION/${RELEASE_VERSION}/g" | |
dotnet pack ${MAIN_PROJ} -p:Version=${RELEASE_VERSION} -p:PackageReleaseNotes="${{ steps.fabulous_changelog.outputs.changes }}" -c ${CONFIG} --property PackageOutputPath=${PWD}/nupkgs | |
dotnet pack ${AVALONIALABS_PROJ} -p:Version=${RELEASE_VERSION} -p:PackageReleaseNotes="${{ steps.avalonialabs_changelog.outputs.changes }}" -c ${CONFIG} --property PackageOutputPath=${PWD}/nupkgs | |
dotnet pack ${ITEMSREPEATER_PROJ} -p:Version=${RELEASE_VERSION} -p:PackageReleaseNotes="${{ steps.itemsrepeater_changelog.outputs.changes }}" -c ${CONFIG} --property PackageOutputPath=${PWD}/nupkgs | |
dotnet pack ${COLORPICKER_PROJ} -p:Version=${RELEASE_VERSION} -p:PackageReleaseNotes="${{ steps.colorpicker_changelog.outputs.changes }}" -c ${CONFIG} --property PackageOutputPath=${PWD}/nupkgs | |
dotnet pack ${DATAGRID_PROJ} -p:Version=${RELEASE_VERSION} -p:PackageReleaseNotes="${{ steps.datagrid_changelog.outputs.changes }}" -c ${CONFIG} --property PackageOutputPath=${PWD}/nupkgs | |
dotnet pack ${TREEDATAGRID_PROJ} -p:Version=${RELEASE_VERSION} -p:PackageReleaseNotes="${{ steps.treedatagrid_changelog.outputs.changes }}" -c ${CONFIG} --property PackageOutputPath=${PWD}/nupkgs | |
dotnet pack ${DIAGNOSTICS_PROJ} -p:Version=${RELEASE_VERSION} -p:PackageReleaseNotes="${{ steps.diagnostics_changelog.outputs.changes }}" -c ${CONFIG} --property PackageOutputPath=${PWD}/nupkgs | |
dotnet pack ${TEMPLATE_PROJ} -p:Version=${RELEASE_VERSION} -p:PackageReleaseNotes="${{ steps.templates_changelog.outputs.changes }}" -c ${CONFIG} --property PackageOutputPath=${PWD}/nupkgs | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Packages | |
path: nupkgs/ | |
- name: Push | |
run: dotnet nuget push "nupkgs/*" -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_TOKEN }} --skip-duplicate |