Skip to content

Commit

Permalink
Migrates the Azure Pipelines to GitHub actions (#17).
Browse files Browse the repository at this point in the history
  • Loading branch information
GillesTourreau committed Jun 18, 2024
1 parent 1b0f5dd commit 167e385
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 85 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/github-actions-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Continuous Integration

on:
pull_request:
branches: [ "main" ]
push:
branches: [ "releases/**" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup .NET 8.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'

- name: Build
run: dotnet build --property:Configuration=Debug "PosInformatique.FluentAssertions.Json.sln"

- name: Test with the dotnet CLI
run: dotnet test --property:Configuration=Debug "PosInformatique.FluentAssertions.Json.sln"
36 changes: 36 additions & 0 deletions .github/workflows/github-actions-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release

on:
workflow_dispatch:
inputs:
VersionPrefix:
type: string
description: The version of the library
required: true
default: 1.3.0
VersionSuffix:
type: string
description: The version suffix of the library (for example rc.1)

run-name: ${{ inputs.VersionPrefix }}-${{ inputs.VersionSuffix }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup .NET 8.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'

- name: Build
run: dotnet pack
--property:Configuration=Release
--property:VersionPrefix=${{ github.event.inputs.VersionPrefix }}
--property:VersionSuffix=${{ github.event.inputs.VersionSuffix }}
"src/FluentAssertions.Json/FluentAssertions.Json.csproj"

- name: Publish the package to nuget.org
run: dotnet nuget push "src/FluentAssertions.Json/bin/Release/*.nupkg" --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json
7 changes: 0 additions & 7 deletions PosInformatique.FluentAssertions.Json.sln
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{7928175B
tests\.editorconfig = tests\.editorconfig
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{E7CF7FC5-E257-4A28-8641-F41032340CA9}"
ProjectSection(SolutionItems) = preProject
build\azure-pipelines-ci.yaml = build\azure-pipelines-ci.yaml
build\azure-pipelines-release.yaml = build\azure-pipelines-release.yaml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -48,7 +42,6 @@ Global
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{7928175B-C3B3-4F81-B956-BF4E4F816436} = {882949E5-7DCE-4EB6-8E9A-CB88FD0ED1F9}
{E7CF7FC5-E257-4A28-8641-F41032340CA9} = {882949E5-7DCE-4EB6-8E9A-CB88FD0ED1F9}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0582B8EB-4FA4-488E-9953-9B7CEEE4E94F}
Expand Down
24 changes: 0 additions & 24 deletions build/azure-pipelines-ci.yaml

This file was deleted.

54 changes: 0 additions & 54 deletions build/azure-pipelines-release.yaml

This file was deleted.

0 comments on commit 167e385

Please sign in to comment.