Skip to content

Merge pull request #11 from RicardoZambon/features/filters #11

Merge pull request #11 from RicardoZambon/features/filters

Merge pull request #11 from RicardoZambon/features/filters #11

Workflow file for this run

name: Release
on:
workflow_dispatch:
push:
branches:
- main
env:
PROJECT_PATH: 'ZWebAPI/ZWebAPI.csproj'
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}/output
NUGET_PUSH_URL: ${{ secrets.NUGET_PUSH_URL }}
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Semantic Release
id: release
uses: cycjimmy/semantic-release-action@v4
with:
working_directory: ./ZWebAPI
extra_plugins: |
@semantic-release/commit-analyzer
@semantic-release/release-notes-generator
@semantic-release/github
@semantic-release/git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Pack & Publish project'
if: ${{ steps.release.outputs.new_release_version }}
run: |
dotnet clean
dotnet pack ${{ env.PROJECT_PATH }} --configuration Release --include-symbols --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }} -p:PackageVersion=${{ steps.release.outputs.new_release_version }}
dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}/*.nupkg -k ${{ secrets.NUGET_TOKEN }} -s ${{ env.NUGET_PUSH_URL }} --skip-duplicate