-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add experimental GitHub Action * Add PR as trigger * Add logging * Add logging * Disable release temporarily * Add release trigger * Rename v2 release pipeline * Remoove automatic version bump * Improve package performance, remove tag generation given created upon release * Fix YAML file error * Final version, add nuget push command
- Loading branch information
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
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" | ||
- name: Parse version | ||
uses: actions/github-script@v4 | ||
id: parse_version | ||
with: | ||
script: | | ||
const version = ${{ github.event.release.tag_name }}.replace('v', '') | ||
core.setOutput('no-version', version) | ||
- 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.parse_version.outputs.version }}.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.parse_version.outputs.version }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} |
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