Skip to content

pre-release

pre-release #6

Workflow file for this run

name: pre-release
on:
release:
types: [prereleased]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
- name: Set current date as env variable
run: echo "NOW=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
- name: Echo current date
run: echo $NOW
- run: dotnet build -c Release src/Scaffolding.sln
- name: Create the Scaffolding package
run: dotnet pack -c Release --no-build -p:Version="${{github.ref_name}}-alpha.${{ env.NOW }}" -o src/Scaffolding/bin/Release src/Scaffolding/Scaffolding.csproj
- name: Publish the Scaffolding package
run: dotnet nuget push src/Scaffolding/bin/Release/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json