Skip to content

Release

Release #29

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
libraryVersion:
description: 'The version of the library to use when compiling and packaging.'
required: true
type: string
prerelease:
description: 'Is this a prerelease (alpha/beta/rc)?'
required: true
type: boolean
env:
CI: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true
jobs:
build:
uses: ./.github/workflows/ci.yml
if: contains('["Swimburger","dprothero","AJLange"]', github.actor)
name: Build, test, and pack
permissions:
checks: write
with:
libraryVersion: ${{ inputs.libraryVersion }}
secrets: inherit
release:
if: contains('["Swimburger","dprothero","AJLange"]', github.actor)
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/download-artifact@v4
name: Download Twilio.AspNet.Common NuGet Package
with:
name: Twilio.AspNet.Common NuGet Package
- uses: actions/download-artifact@v4
name: Download Twilio.AspNet.Core NuGet Package
with:
name: Twilio.AspNet.Core NuGet Package
- uses: actions/download-artifact@v4
name: Download Twilio.AspNet.Mvc NuGet Package
with:
name: Twilio.AspNet.Mvc NuGet Package
- uses: ncipollo/release-action@v1
name: Create GitHub Release and Tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: ${{ inputs.libraryVersion }}
artifacts: "*.nupkg,*.snupkg"
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: ${{ inputs.prerelease }}
- name: (Twilio.AspNet.Common) Push to NuGet
run: |
dotnet nuget push 'Twilio.AspNet.Common.${{ inputs.libraryVersion }}.nupkg' \
--api-key ${{ secrets.NUGET_API_KEY }} \
--source https://api.nuget.org/v3/index.json
- name: (Twilio.AspNet.Core) Push to NuGet
run: |
dotnet nuget push 'Twilio.AspNet.Core.${{ inputs.libraryVersion }}.nupkg' \
--api-key ${{ secrets.NUGET_API_KEY }} \
--source https://api.nuget.org/v3/index.json
- name: (Twilio.AspNet.Mvc) Push to NuGet
run: |
dotnet nuget push 'Twilio.AspNet.Mvc.${{ inputs.libraryVersion }}.nupkg' \
--api-key ${{ secrets.NUGET_API_KEY }} \
--source https://api.nuget.org/v3/index.json