Allow Beta Package Creation #41
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: Build & Create Release (main) | |
on: | |
push: | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+' | |
- '[0-9]+.[0-9]+.[0-9]+-beta' | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build & Test | |
uses: ./.github/workflows/_build.yml | |
deploy: | |
name: Create Draft Release with NuGet Packages & Documentation Site | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
env: | |
DOTNET_NOLOGO: true | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Avoid pre-populating the NuGet package cache | |
steps: | |
- name: 'Checkout Code' | |
uses: actions/checkout@v4 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v4 | |
- run: Compress-Archive -Path "Documentation Site/*" -DestinationPath DocumentationSite.zip | |
shell: pwsh | |
- name: Create Draft Release | |
shell: pwsh | |
# Can't just use wildcard in this command due to https://github.com/cli/cli/issues/5099 so use Get-Item | |
run: | | |
gh release create --repo "AdrianJSClark/aydsko-iracingdata" --draft --title "${{ github.ref_name }}" --notes-file "Release Notes/Package Release Notes.txt" "release-${{ github.ref_name }}" (Get-Item "NuGet Packages/*.nupkg","DocumentationSite.zip") | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |