-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release/6.0] Modernize build system. (#310)
* Update Paket. * Update `MSBuild.StructuredLogger` build-time dependency. * Update Paket and FAKE. * Move CI to GitHub Actions. * Add Release workflow. * Run only tests in CI. * Remove unused release code from the build script. * Add step to restore Paket dependencies. * Fix Paket dependencies. * Remove Paket and use a dedicated build project. * Locate MSBuild in the build script. * Fix target syntax in command line. * Remove more unused code in the build script. * Fix passing command line arguments. * Remove condition that likely prevents publishing of NuGet packages. The idea was that it would gracefully skip publishing on forks, but apparently the `if` is not evaluated with the environment's variables. * Fix loading of MSBuild assemblies. * Remove remaining references to AppVeyor and let the build script determine the version suffix. * Use custom release version only when not making a release. * Do not run release workflow on this branch.
- Loading branch information
1 parent
a39cea9
commit 43454fe
Showing
13 changed files
with
162 additions
and
414 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- mainstream | ||
pull_request: | ||
paths-ignore: | ||
- '**/*.md' | ||
- '**/*.txt' | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
defaults: | ||
run: | ||
shell: pwsh | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up .NET SDK | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Restore .NET local tools | ||
run: dotnet tool restore | ||
- name: Run tests | ||
run: dotnet run --project eng/Farkle.Build.fsproj -- -t Test | ||
|
||
full_ci_passed: | ||
needs: [test] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: exit 0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# This workflow gives a positive check result to PRs that only | ||
# change non-code files. It is needed for branch protection to work. | ||
name: CI (dummy) | ||
|
||
on: | ||
pull_request: | ||
# Paths must be synchronized with ci.yml. | ||
paths: | ||
- '**/*.md' | ||
- '**/*.txt' | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
full_ci_passed: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: exit 0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- mainstream | ||
- release/* | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
pack: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Restore .NET local tools | ||
run: dotnet tool restore | ||
- name: Pack | ||
run: dotnet run --project eng/Farkle.Build.fsproj -- -t NuGetPack | ||
- name: Upload package artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: nuget-packages | ||
path: ./bin | ||
release: | ||
needs: pack | ||
environment: ${{ github.event_name == 'release' && 'release' || 'nightly' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
- name: Download package artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: nuget-packages | ||
path: ./bin | ||
- name: Publish | ||
run: dotnet nuget push ./bin/*.nupkg --api-key ${{ secrets.NUGET_KEY }} --source ${{ vars.NUGET_FEED }} |
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
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<OutputType>Exe</OutputType> | ||
<FakeVersion>5.23.1</FakeVersion> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="build.fs" /> | ||
<PackageReference Include="Fake.BuildServer.GitHubActions" Version="$(FakeVersion)" /> | ||
<PackageReference Include="Fake.Core.ReleaseNotes" Version="$(FakeVersion)" /> | ||
<PackageReference Include="Fake.Core.Target" Version="$(FakeVersion)" /> | ||
<PackageReference Include="Fake.Core.UserInput" Version="$(FakeVersion)" /> | ||
<PackageReference Include="Fake.IO.FileSystem" Version="$(FakeVersion)" /> | ||
<PackageReference Include="Fake.IO.Zip" Version="$(FakeVersion)" /> | ||
<PackageReference Include="Fake.DotNet.Cli" Version="$(FakeVersion)" /> | ||
<PackageReference Include="Fake.DotNet.FsFormatting" Version="$(FakeVersion)" /> | ||
<PackageReference Include="Fake.Tools.Git" Version="$(FakeVersion)" /> | ||
<!-- 17.3.2 is the last MSBuild version that targets .NET 6. If it is | ||
updated without updating the target framework, restoring will not fail | ||
because NuGet will pick the .NET Standard 2.0 target, but because NS2.0 | ||
only provides reference assemblies, the assemblies will not be copied to | ||
the output directory, and we will get missing assembly errors at runtime. --> | ||
<PackageReference Include="Microsoft.Build.Framework" Version="17.3.2" /> | ||
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.3.2" /> | ||
<PackageReference Include="MSBuild.StructuredLogger" Version="2.2.374" /> | ||
<PackageReference Include="Scriban" Version="5.11.0" /> | ||
</ItemGroup> | ||
</Project> |
Oops, something went wrong.