Release #59
Workflow file for this run
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: | |
release: | |
types: [ published ] | |
permissions: | |
actions: write | |
checks: write | |
contents: write | |
deployments: read | |
issues: write | |
discussions: write | |
packages: write | |
pages: write | |
pull-requests: write | |
security-events: write | |
statuses: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Define project file | |
uses: haya14busa/action-cond@v1 | |
id: project_file | |
with: | |
cond: ${{ contains(github.event.release.target_commitish, 'release/video/') }} | |
if_true: "Vonage.Server.csproj" | |
if_false: "Vonage.csproj" | |
- name: Define project folder | |
uses: haya14busa/action-cond@v1 | |
id: project_folder | |
with: | |
cond: ${{ contains(github.event.release.target_commitish, 'release/video/') }} | |
if_true: "Vonage.Server" | |
if_false: "Vonage" | |
- uses: bhowell2/[email protected] | |
id: extract_version | |
with: | |
value: ${{ github.event.release.tag_name }} | |
index_of_str: "v" | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.release.target_commitish }} | |
- name: Build | |
run: dotnet build -c Release ${{ steps.project_folder.outputs.value }}/${{ steps.project_file.outputs.value }} -v minimal | |
- name: Build Signed | |
run: dotnet build -c ReleaseSigned ${{ steps.project_folder.outputs.value }}/${{ steps.project_file.outputs.value }} -v minimal | |
- name: Pack | |
run: dotnet pack -c Release ${{ steps.project_folder.outputs.value }}/${{ steps.project_file.outputs.value }} -v minimal --no-build | |
- name: Pack Signed | |
run: dotnet pack -c ReleaseSigned ${{ steps.project_folder.outputs.value }}/${{ steps.project_file.outputs.value }} -v minimal --no-build | |
- name: NuGet Push | |
run: dotnet nuget push ${{ steps.project_folder.outputs.value }}/bin/Release/Vonage.${{ steps.extract_version.outputs.substring }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} | |
- name: NuGet Push Signed | |
run: dotnet nuget push ${{ steps.project_folder.outputs.value }}/bin/ReleaseSigned/Vonage.Signed.${{ steps.extract_version.outputs.substring }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} |