Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dust765 committed Feb 16, 2023
1 parent fd764e1 commit 7b09da5
Showing 1 changed file with 11 additions and 22 deletions.
33 changes: 11 additions & 22 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ name: Deploy

on:
workflow_dispatch:
# workflow_run:
# branches: [main]
# workflows: [Build-Test]
# types:
# - completed
workflow_run:
branches: [dev_dust765]
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.csproj"
CUO_ZIP_NAME: "ClassicUO-dev-preview-release.zip"
CUO_ZIP_NAME: "ClassicUO-dev-dust765.zip"

DOTNET_NOLOGO: false
DOTNET_CLI_TELEMETRY_OPTOUT: 1
Expand All @@ -22,7 +22,7 @@ env:

jobs:
build:
#if: ${{ github.event.workflow_run.conclusion == 'success' }} && "${{ env.GITHUB_REPOSITORY }}" == 'ClassicUO/ClassicUO'
if: ${{ github.event.workflow_run.conclusion == 'success' }} || github.event_name == 'workflow_dispatch' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
exclusions: 'ClassicUO.exe.config'

- name: Create manifest
run: dotnet run --project tools/ManifestCreator/ManifestCreator.csproj "${{ env.CUO_OUTPUT_PATH }}" "dev-preview" "${{ env.CUO_ZIP_NAME }}"
run: dotnet run --project tools/ManifestCreator/ManifestCreator.csproj "${{ env.CUO_OUTPUT_PATH }}" "dev-dust765" "${{ env.CUO_ZIP_NAME }}"

- name: Move output
run: |
Expand All @@ -66,27 +66,16 @@ jobs:
uses: dev-drprasad/delete-tag-and-release@v0.2.0
with:
delete_release: true
tag_name: ClassicUO-dev-release
tag_name: ClassicUO-dev-dust765-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Release
uses: ncipollo/release-action@v1
with:
artifacts: "upload/${{ env.CUO_ZIP_NAME }}"
name: 'ClassicUO dev preview'
name: '0.1.11.${{ github.run_number }} dev_dust765'
body: 'This build may not be safe: use it at your own risk.'
prerelease: true
tag: ClassicUO-dev-release
tag: ClassicUO-dev-dust765-release
token: ${{ secrets.GITHUB_TOKEN }}

- name: FTP Deploy
uses: SamKirkland/FTP-Deploy-Action@4.3.2
with:
server: ftp.classicuo.eu
username: ${{ secrets.FTP_USER }}
password: ${{ secrets.FTP_PSW }}
protocol: ftps
server-dir: /www.classicuo.eu/dev/deploy/
local-dir: upload/

0 comments on commit 7b09da5

Please sign in to comment.