Merge pull request #710 from Blazam-App/v1-Dev #209
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 Nightly | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- v1-Nightly | |
jobs: | |
build: | |
runs-on: windows-latest | |
permissions: write-all | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup .NET Core SDK 8 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build application (Debug) | |
run: dotnet build -c Debug | |
- name: Setup Playwright | |
shell: pwsh | |
run: | | |
PlaywrightTests/bin/Debug/net8.0/playwright.ps1 install; | |
- name: Test application | |
run: dotnet test -c Release | |
- name: Build application (Release) | |
run: dotnet publish -c Release -o bin/publish BLAZAM/BLAZAM.csproj | |
- name: Set assembly version as environment variable | |
shell: pwsh | |
id: get_version | |
run: | | |
$file = "bin/publish/BLAZAM.dll"; | |
$versionInfo = (Get-Item $file).VersionInfo | |
$fileVersion = $versionInfo.FileVersion | |
$productVersion = $versionInfo.ProductVersion | |
echo "ASSEMBLY_VERSION=$fileVersion.$productVersion" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | |
- name: Show Version | |
run: echo $env.ASSEMBLY_VERSION | |
- name: Compress files | |
run: Compress-Archive -Path bin/publish/* -DestinationPath blazam-nightly-v${{ env.ASSEMBLY_VERSION }}.zip | |
# For Linux | |
#- name: "Compress files" | |
# uses: montudor/action-zip@v1 | |
# with: | |
# args: zip -qq -r blazam-dev.zip bin/publish | |
- name: Update nightly release | |
uses: andelf/nightly-release@main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: 'Nightly1' | |
name: 'v1-Nightly' | |
prerelease: true | |
body: This release is always the latest nightly release. These versions are unstable and may break your application. You've been warned. | |
files: | | |
./blazam-nightly-v${{ env.ASSEMBLY_VERSION }}.zip |