Skip to content

Commit bafbb06

Browse files
committed
remove appveyor, add deployment
1 parent c1d89d1 commit bafbb06

2 files changed

Lines changed: 44 additions & 50 deletions

File tree

.github/workflows/build.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: build
22

33
on:
44
push:
5+
branches: [ master ]
56
pull_request:
7+
branches: [ master ]
68

79
jobs:
810
windows:
@@ -27,8 +29,50 @@ jobs:
2729
run: |
2830
.\Project\build_vs.cmd x64 Release
2931
32+
- name: Package build
33+
shell: pwsh
34+
run: |
35+
$zipName = "OpenFodderEditor-x64-Release-latest.zip"
36+
if (Test-Path $zipName) { Remove-Item $zipName -Force }
37+
Compress-Archive -Path Run\* -DestinationPath $zipName
38+
Write-Output "ZIP_NAME=$zipName" | Out-File -FilePath $env:GITHUB_ENV -Append
39+
3040
- name: Upload Run artifacts
3141
uses: actions/upload-artifact@v4
3242
with:
3343
name: editor-run
3444
path: Run/*
45+
46+
- name: Configure AWS credentials
47+
uses: aws-actions/configure-aws-credentials@v4
48+
with:
49+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
50+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
51+
aws-region: ${{ secrets.AWS_REGION || 'us-east-1' }}
52+
53+
- name: Upload build zip to S3
54+
shell: pwsh
55+
run: |
56+
aws s3 cp "$env:ZIP_NAME" "s3://openfodder-builds/$env:ZIP_NAME" --acl public-read
57+
58+
- name: Discord notify (success)
59+
if: ${{ success() }}
60+
shell: pwsh
61+
run: |
62+
$payload = @{
63+
content = "OpenFodder Editor build succeeded: $env:ZIP_NAME"
64+
} | ConvertTo-Json -Compress
65+
Invoke-RestMethod -Uri $env:WEBHOOK_URL -Method Post -ContentType "application/json" -Body $payload
66+
env:
67+
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
68+
69+
- name: Discord notify (failure)
70+
if: ${{ failure() }}
71+
shell: pwsh
72+
run: |
73+
$payload = @{
74+
content = "OpenFodder Editor build failed."
75+
} | ConvertTo-Json -Compress
76+
Invoke-RestMethod -Uri $env:WEBHOOK_URL -Method Post -ContentType "application/json" -Body $payload
77+
env:
78+
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}

appveyor.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)