Skip to content

build(deps): bump xunit.extensibility.core from 2.5.0 to 2.5.1 #5

build(deps): bump xunit.extensibility.core from 2.5.0 to 2.5.1

build(deps): bump xunit.extensibility.core from 2.5.0 to 2.5.1 #5

Workflow file for this run

name: 'Publish'
on:
workflow_dispatch: # To can dispatch manually
push: # First pipeline to run when deploy a new version
branches:
- main
paths:
- "src/**" # Only run when exists changes in source code
env:
SDK_VERSION: '6.0.401'
PACKAGE_PATH: ./src/**/*.nupkg
NUGET_SERVER: https://api.nuget.org/v3/index.json
jobs:
deploy-nuget:
name: "Deploy nuget"
runs-on: 'ubuntu-latest'
if: github.event_name == 'push'
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: "Setup .NET"
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.SDK_VERSION }}
- name: Semantic Release
id: 'semantic-release'
uses: cycjimmy/[email protected]
with:
semantic_version: 21.1.1
extra_plugins: |
semantic-release-plugin-csproj
@semantic-release/changelog
@semantic-release/github
@semantic-release/git
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "New version"
run: echo "New version ${{ steps.semantic-release.outputs.new_release_version }}"
- name: "Restore dependencies"
if: ${{ steps.semantic-release.outputs.new_release_version != '' }}
run: dotnet restore
- name: "Build"
if: ${{ steps.semantic-release.outputs.new_release_version != '' }}
run: dotnet build -c Release --no-restore
- name: "Pack"
if: ${{ steps.semantic-release.outputs.new_release_version != '' }}
run: dotnet pack -c Release --no-build -p:PackageVersion=${{ steps.semantic-release.outputs.new_release_version }} -p:Version==${{ steps.semantic-release.outputs.new_release_version }}
- name: "Publish nuget"
if: ${{ steps.semantic-release.outputs.new_release_version != '' }}
run: dotnet nuget push ${{ env.PACKAGE_PATH }} --api-key ${{ secrets.NUGET_TOKEN }} --source ${{ env.NUGET_SERVER }} --skip-duplicate
# To can dispatch manually when the semantic-release-action is not working or failed
deploy-nuget-manually:
name: "Deploy nuget manually"
runs-on: 'ubuntu-latest'
if: github.event_name == 'workflow_dispatch'
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: "Setup .NET"
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.SDK_VERSION }}
- name: "Restore dependencies"
run: dotnet restore
- name: "Build"
run: dotnet build -c Release --no-restore
- name: "Pack"
run: dotnet pack -c Release --no-build
- name: "Publish nuget"
run: dotnet nuget push ${{ env.PACKAGE_PATH }} --api-key ${{ secrets.NUGET_TOKEN }} --source ${{ env.NUGET_SERVER }} --skip-duplicate