Skip to content

.github/workflows/deploy.yml #30

.github/workflows/deploy.yml

.github/workflows/deploy.yml #30

Workflow file for this run

name: Deploy
on:
workflow_dispatch:
workflow_run:
branches: [dev_dust765_x_tazuo]
workflows: [Build-Test]
types:
- completed
env:
CUO_ASSEMBLY_VERSION: '0.1.11.${{ github.run_number }}'
CUO_OUTPUT_PATH: '../../bin/dist'
CUO_PROJECT_PATH: "src/ClassicUO.Client/ClassicUO.Client.csproj"
CUO_ZIP_NAME: "ClassicUO-dev-dust765-x-tazuo.zip"
DOTNET_NOLOGO: false
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
NUGET_XMLDOC_MODE: skip
jobs:
build:
if: ${{ github.event.workflow_run.conclusion == 'success' }} || github.event_name == 'workflow_dispatch' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v3
with:
ref: dev_dust765_x_tazuo
- name: Get submodules
run: |
git config --global url."https://".insteadOf git://
git submodule update --init --recursive
- name: Setup .NET 7
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
include-prerelease: true
- name: Build
run: dotnet publish ${{ env.CUO_PROJECT_PATH }} -c Release -o ${{ env.CUO_OUTPUT_PATH }} -p:IS_DEV_BUILD=true -p:AssemblyVersion=${{ env.CUO_ASSEMBLY_VERSION }} -p:FileVersion=${{ env.CUO_ASSEMBLY_VERSION }}
- name: Create manifest
run: |
dotnet run --project tools/ManifestCreator/ManifestCreator.csproj "${{ env.CUO_OUTPUT_PATH }}" "dev-dust765-x-tazuo" "${{ env.CUO_ZIP_NAME }}"
mkdir upload
mv manifest.xml upload
- name: Create package
uses: thedoctor0/zip-release@master
with:
type: 'zip'
directory: ${{ env.CUO_OUTPUT_PATH }}
filename: ${{ env.CUO_ZIP_NAME }}
exclusions: '*.zip manifest.xml'
- name: Move output
run: mv "${{ env.CUO_OUTPUT_PATH }}/${{ env.CUO_ZIP_NAME }}" upload
- name: Remove old Release
uses: dev-drprasad/[email protected]
with:
delete_release: true
tag_name: ClassicUO-dev-dust765-x-tazuo-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release
uses: ncipollo/release-action@v1
with:
artifacts: "upload/${{ env.CUO_ZIP_NAME }}"
name: '0.1.11.${{ github.run_number }} dev_dust765_x_tazuo'
body: 'This build may not be safe: use it at your own risk. including Dust765 and TazUO features'
prerelease: true
tag: ClassicUO-dev-dust765-x-tazuo-release
token: ${{ secrets.GITHUB_TOKEN }}