Update build.yml

This commit is contained in:
alice
2026-07-26 02:33:28 +02:00
parent 04871f2a3d
commit 5b4b06cb03
+35
View File
@@ -8,6 +8,9 @@ on:
branches: branches:
- "*" - "*"
types: [opened, synchronize, reopened] types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: false
jobs: jobs:
build: build:
name: Build binaries name: Build binaries
@@ -43,3 +46,35 @@ jobs:
name: ${{matrix.configuration}} binaries name: ${{matrix.configuration}} binaries
path: | path: |
build/bin/${{matrix.configuration}}/iw5-gsc-utils.dll build/bin/${{matrix.configuration}}/iw5-gsc-utils.dll
deploy:
name: Deploy artifacts
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && (github.ref == 'refs/heads/main')
steps:
- name: Setup main environment
if: github.ref == 'refs/heads/main'
run: echo "ALICE_MASTER_PATH=${{ secrets.ALICE_MASTER_SSH_PATH }}" >> $GITHUB_ENV
- name: Download Release binaries
uses: actions/download-artifact@v4
with:
name: Release binaries
- name: Install SSH key
uses: shimataro/[email protected]
with:
key: ${{ secrets.ALICE_MASTER_SSH_PRIVATE_KEY }}
known_hosts: 'just-a-placeholder-so-we-dont-get-errors'
- name: Add known hosts
run: ssh-keyscan -H ${{ secrets.ALICE_MASTER_SSH_ADDRESS }} >> ~/.ssh/known_hosts
- name: Remove old data files
run: ssh ${{ secrets.ALICE_MASTER_SSH_USER }}@${{ secrets.ALICE_MASTER_SSH_ADDRESS }} rm -rf ${{ env.ALICE_MASTER_PATH }}/iw5-gsc-utils/*
- name: Upload binary
run: rsync -avz iw5-gsc-utils.dll ${{ secrets.ALICE_MASTER_SSH_USER }}@${{ secrets.ALICE_MASTER_SSH_ADDRESS }}:${{ env.ALICE_MASTER_PATH }}/iw5-gsc-utils/
- name: Publish changes
run: ssh ${{ secrets.ALICE_MASTER_SSH_USER }}@${{ secrets.ALICE_MASTER_SSH_ADDRESS }} ${{ secrets.ALICE_MASTER_SSH_CHANGE_PUBLISH_COMMAND }}