Skip to content

Bump FluentAssertions from 6.2.0 to 6.12.0 in /tests #111

Bump FluentAssertions from 6.2.0 to 6.12.0 in /tests

Bump FluentAssertions from 6.2.0 to 6.12.0 in /tests #111

Workflow file for this run

# CI/CD pipeline.
name: CI
on:
workflow_dispatch:
inputs:
version:
description: 'Version number'
required: true
pull_request:
push:
branches:
- "main"
env:
CI: true
jobs:
version:
name: Create a version number
runs-on: ubuntu-22.04
timeout-minutes: 1
outputs:
tag: ${{ steps.create_version.outputs.tag }}
package: ${{ steps.create_version.outputs.package }}
permissions:
contents: 'write'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Create version
id: create_version
uses: degory/create-version@v0.0.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
env:
PRERELEASE: ${{ github.event_name == 'pull_request' }}
build:
name: Build, test, and publish package
runs-on: ubuntu-latest
container: mcr.microsoft.com/dotnet/sdk:8.0
timeout-minutes: 10
needs: [version]
steps:
- uses: actions/checkout@v3
- name: Pack
run: dotnet pack ghul-pipes -p:Version=${{ needs.version.outputs.package }}
- name: Test
run: dotnet test tests
- name: Upload .NET package artefact
uses: actions/upload-artifact@v4
with:
name: package
path: ghul-pipes/nupkg
- name: Publish package to GitHub
if: ${{ github.actor != 'dependabot[bot]' }}
run: dotnet nuget push ./ghul-pipes/nupkg/*.nupkg -k ${GITHUB_TOKEN} -s https://nuget.pkg.github.com/degory/index.json --skip-duplicate --no-symbols
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish package to NuGet
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
run: dotnet nuget push ./ghul-pipes/nupkg/*.nupkg -k ${NUGET_TOKEN} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
env:
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
create_release:
needs: [version, build]
name: Create release
runs-on: ubuntu-20.04
timeout-minutes: 5
if: ${{ github.event_name == 'push' }}
steps:
- uses: actions/checkout@v3
- name: Download package
uses: actions/download-artifact@v4
with:
name: package
path: nupkg
- name: Create changelog
run: git log -1 --format="%s%n%n%b%n%n" >changelog.txt
- name: Create a Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.version.outputs.tag }}
release_name: ${{ needs.version.outputs.tag }}
body_path: changelog.txt
draft: false
- name: Upload package asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./nupkg/ghul.pipes.${{ needs.version.outputs.package }}.nupkg
asset_name: ghul.pipes.${{ needs.version.outputs.package }}.nupkg
asset_content_type: application/octet-stream