Skip to content

Improved packaged README.md can now include parts of the project's RE… #3

Improved packaged README.md can now include parts of the project's RE…

Improved packaged README.md can now include parts of the project's RE… #3

Workflow file for this run

name: Redate Build Action
on:
push:
branches: [ "main", "Redate/integrate" ]
paths:
- .github/workflows/Redate.yaml
- Redate/**
pull_request:
branches: [ "main" ]
paths:
- .github/workflows/Redate.yaml
- Redate/**
workflow_dispatch:
jobs:
build:
strategy:
matrix:
configuration: [Debug, Release]
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: dotnet restore --arch x64 ./Redate/Redate.sln
- name: Inject build number
shell: pwsh
run: |
$csproj = New-Object System.XML.XMLDocument
$csprojPath = Resolve-Path "./Redate/Redate.csproj"
$csproj.Load($csprojPath)
$version = New-Object System.Version $csproj.Project.PropertyGroup.Version
$version = New-Object System.Version @( $version.Major, $version.Minor, ([System.Math]::Max(0, $version.Build)), $env:GITHUB_RUN_NUMBER )
Write-Host "Version number: $version"
$csproj.Project.PropertyGroup.Version = $version.ToString()
$csproj.Save($csprojPath)
Write-Output "FULL_VERSION_NUMBER=$version" >> $env:GITHUB_ENV
- name: Build
run: dotnet build --configuration ${{ matrix.configuration }} --arch x64 --no-restore ./Redate/Redate.csproj
- name: Publish
if: ${{ matrix.configuration == 'Release' }}
run: dotnet publish --configuration Release -p:PublishProfile=FolderProfile -p:DebugType=None -p:DebugSymbols=false --no-build --no-restore ./Redate/Redate.csproj
- name: Copy Extra Files
if: ${{ matrix.configuration == 'Release' }}
shell: pwsh
run: |
copy .\LICENSE .\Redate\bin\publish\
.\Scripts\makeProjReadme.ps1 Redate .\Redate\bin\publish\README.md
- name: Upload Artifacts
if: ${{ matrix.configuration == 'Release' }}
uses: actions/upload-artifact@v4
with:
name: Redate-${{env.FULL_VERSION_NUMBER}}
path: |
Redate/bin/publish
!**/*.pdb
!**/Redate.dll.config
if-no-files-found: error