Skip to content

Modernize CI/CD scripts #151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 20, 2024
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
48 changes: 0 additions & 48 deletions .github/workflows/Windows_release.yml

This file was deleted.

84 changes: 50 additions & 34 deletions .github/workflows/pr_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,46 +30,62 @@ jobs:
windows-latest:
name: windows-latest
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- name: Make build.sh executable
run: chmod +x ./build.sh
- name: Make build.cmd executable
run: chmod +x ./build.cmd
- uses: actions/setup-dotnet@v1
- name: "Checkout"
uses: actions/[email protected]
with:
dotnet-version: 6.0.*
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v2
lfs: true
fetch-depth: 0

- name: "Install .NET SDK"
uses: actions/[email protected]
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
- name: Run './build.cmd All'
run: ./build.cmd All
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
global-json-file: "./global.json"

- name: "Update release notes"
shell: pwsh
run: |
./build.ps1

- name: "dotnet build"
run: dotnet build -c Release

- name: "dotnet test"
shell: bash
run: dotnet test -c Release

- name: "dotnet pack"
run: dotnet pack -c Release -o ./bin/nuget

ubuntu-latest:
name: ubuntu-latest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Make build.sh executable
run: chmod +x ./build.sh
- name: Make build.cmd executable
run: chmod +x ./build.cmd
- uses: actions/setup-dotnet@v1
- name: "Checkout"
uses: actions/[email protected]
with:
dotnet-version: 6.0.*
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v2
lfs: true
fetch-depth: 0

- name: "Install .NET SDK"
uses: actions/[email protected]
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
- name: Run './build.cmd All'
run: ./build.cmd All
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
global-json-file: "./global.json"

- name: "Update release notes"
shell: pwsh
run: |
./build.ps1

- name: "dotnet build"
run: dotnet build -c Release

# .NET Framework tests can't run reliably on Linux, so we only do .NET Core
- name: "dotnet test"
shell: bash
run: dotnet test -c Release -f net6.0

- name: "dotnet pack"
run: dotnet pack -c Release -o ./bin/nuget
52 changes: 52 additions & 0 deletions .github/workflows/publish_nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Publish NuGet

on:
push:
tags:
- '*'

jobs:
publish-nuget:

name: publish-nuget
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: "Update release notes"
shell: pwsh
run: |
./build.ps1

- name: Create Packages
run: dotnet pack /p:PackageVersion=${{ github.ref_name }} -c Release -o ./output

- name: Push Packages
run: dotnet nuget push "output/*.nupkg" -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json

- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: 'Akka.TestKit.NUnit ${{ github.ref_name }}'
tag_name: ${{ github.ref }}
body_path: RELEASE_NOTES.md
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Upload Release Asset
uses: AButler/[email protected]
with:
repo-token: ${{ github.token }}
release-tag: ${{ github.ref_name }}
files: 'output/*.nupkg'
167 changes: 0 additions & 167 deletions .nuke/build.schema.json

This file was deleted.

4 changes: 0 additions & 4 deletions .nuke/parameters.json

This file was deleted.

4 changes: 0 additions & 4 deletions Akka.TestKit.Nunit.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Akka.TestKit.NUnit3", "src\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Akka.TestKit.NUnit3.Tests", "src\Akka.TestKit.NUnit3.Tests\Akka.TestKit.NUnit3.Tests.csproj", "{FF91B397-1E60-4B94-99A1-B534C7BB91A5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{637FF340-E344-4119-8E64-FE105974B754}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{873747EF-ACF9-4BB2-90C1-052BFA3C84F2}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
Expand Down Expand Up @@ -41,8 +39,6 @@ Global
{FF91B397-1E60-4B94-99A1-B534C7BB91A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF91B397-1E60-4B94-99A1-B534C7BB91A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FF91B397-1E60-4B94-99A1-B534C7BB91A5}.Release|Any CPU.Build.0 = Release|Any CPU
{637FF340-E344-4119-8E64-FE105974B754}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{637FF340-E344-4119-8E64-FE105974B754}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Loading
Loading