feat: trigger new deployment #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
env: | |
PROJECT_PATH: 'Pluggy.SDK/Pluggy.SDK.csproj' | |
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}/output | |
NUGET_PUSH_URL: ${{ secrets.NUGET_PUSH_URL }} | |
NUGET_KEY: ${{ secrets.NUGET_KEY }} | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }} | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 3.1.x | |
- name: Semantic Release | |
id: release | |
uses: cycjimmy/semantic-release-action@v3 | |
with: | |
semantic_version: 19 | |
working_directory: ./Pluggy.SDK | |
extra_plugins: | | |
@semantic-release/commit-analyzer@9 | |
@semantic-release/release-notes-generator@10 | |
@semantic-release/github@8 | |
@semantic-release/git@10 | |
@semantic-release/exec@6 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
RUNNER_DEBUG: 1 | |
- 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 }} | |
dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}/*.nupkg -k ${{ secrets.NUGET_KEY }} -s ${{ env.NUGET_PUSH_URL }} |