Skip to content

improv: send item chat delve errors to main chat window #471

improv: send item chat delve errors to main chat window

improv: send item chat delve errors to main chat window #471

name: Create Release
concurrency:
group: create_release
cancel-in-progress: true
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
get_release_info:
name: Get Release Info
runs-on: ubuntu-20.04
outputs:
version: ${{ steps.getmetadata.outputs.version }}
date: ${{ steps.getmetadata.outputs.date }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Generate Release Info
run: |
version="1.9.7"
last_version_tag=$(git tag -l --sort=creatordate | grep -E '^([0-9]+\.){3}[0-9]+$' | tail -n1)
git log origin/master --first-parent --format="%s%n%w(0,4,4)%b" "$last_version_tag".. | grep -v "^$" >> patch_notes.txt
if [ ! -s patch_notes.txt ]; then echo "No commits since last run."; exit 1; fi #fail if empty
#Prepend patch notes with backticks
sed -i '1s/^/```\n/' patch_notes.txt
new_build_number=$((1+$(echo "$last_version_tag" | grep -oE "[0-9]+$")))
new_version_tag="$version"."$new_build_number"
echo -n $new_version_tag > version.txt
- name: Get Metadata Outputs
id: getmetadata
run: |
echo "::set-output name=version::$(cat version.txt)"
echo "::set-output name=date::$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
- name: Upload
uses: actions/upload-artifact@v2
with:
name: release_info
path: |
patch_notes.txt
netframework_build:
name: Create NetFramework Build
needs: get_release_info
runs-on: windows-2019
strategy:
matrix:
build_target: [Debug,Release]
env:
OUTPUT_FILE_NAME: DOLServer_net45_${{ matrix.build_target }}.zip
OUTPUT_FILE_NAME_LINUX: DOLServer_linux_net45_${{ matrix.build_target }}.zip
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
$Env:DOTNET_CLI_TELEMETRY_OPTOUT=1
$assembly_version="${{ needs.get_release_info.outputs.version }}"
dotnet build --configuration "${{ matrix.build_target}}" -p:Version="$assembly_version" --verbosity normal "Dawn of Light.sln"
cp -recurse $env:USERPROFILE\.nuget\packages\sqlitepclraw.lib.e_sqlite3\*\runtimes\linux-* .\${{ matrix.build_target }}\lib\runtimes\
cp -recurse $env:USERPROFILE\.nuget\packages\sqlitepclraw.lib.e_sqlite3\*\runtimes\alpine-* .\${{ matrix.build_target }}\lib\runtimes\
cp -recurse $env:USERPROFILE\.nuget\packages\sqlitepclraw.lib.e_sqlite3\*\runtimes\osx-* .\${{ matrix.build_target }}\lib\runtimes\
- name: Test Build
run: |
dotnet test --verbosity normal --filter "DOL.UnitTests&TestCategory!=Explicit" .\build\Tests\${{ matrix.build_target }}\lib\Tests.dll
dotnet test --verbosity normal --filter "DOL.Integration&TestCategory!=Explicit" .\build\Tests\${{ matrix.build_target }}\lib\Tests.dll
- name: Compress Build Artifacts
run: |
Compress-Archive -Path .\${{ matrix.build_target }}\* -DestinationPath ${{ env.OUTPUT_FILE_NAME }}
- name: Upload Build Output
uses: actions/upload-artifact@v2
with:
name: build_artifacts
path: |
${{ env.OUTPUT_FILE_NAME }}
${{ env.OUTPUT_FILE_NAME_LINUX }}
netcore_build:
name: Create NetCore Build
needs: get_release_info
runs-on: windows-2019
strategy:
matrix:
build_target: [Debug]
env:
OUTPUT_FILE_NAME: DOLServer_NetCore_Alpha_${{ matrix.build_target }}.zip
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Build
run: |
$Env:DOTNET_CLI_TELEMETRY_OPTOUT=1
$assembly_version="${{ needs.get_release_info.outputs.version }}"
dotnet build --configuration "${{ matrix.build_target}}" -p:Version="$assembly_version" --verbosity normal "NetCore\DOLdotnet.sln"
- name: Test Build
run: |
dotnet test --verbosity normal --filter "DOL.UnitTests&TestCategory!=Explicit" .\NetCore\build\Tests\${{ matrix.build_target }}\lib\Tests.dll
dotnet test --verbosity normal --filter "DOL.Integration&TestCategory!=Explicit" .\NetCore\build\Tests\${{ matrix.build_target }}\lib\Tests.dll
- name: Compress Build Artifacts
run: Compress-Archive -Path .\NetCore\${{ matrix.build_target }}\* -DestinationPath ${{ env.OUTPUT_FILE_NAME }}
- name: Upload Build Output
uses: actions/upload-artifact@v2
with:
name: build_artifacts
path: ${{ env.OUTPUT_FILE_NAME }}
create_release:
name: Create Release
if: always() && needs.netframework_build.result == 'success'
needs: [get_release_info,netframework_build,netcore_build]
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download artifacts
uses: actions/download-artifact@v2
- name: Create Release
run: |
new_version_tag="${{ needs.get_release_info.outputs.version }}"
gh release create "$new_version_tag" --title "$new_version_tag" --notes-file release_info/patch_notes.txt build_artifacts/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}