Desktop automation (#4183)

* Update snapshots-pc.yml
This commit is contained in:
Chris H
2023-11-17 22:11:36 -05:00
committed by GitHub
parent e223f98efd
commit 9850ecd71b

View File

@@ -2,6 +2,12 @@ name: Create Desktop Snapshot
on:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '30 18 * * *'
@@ -42,9 +48,34 @@ jobs:
mvn -U -B clean -P windows-linux install -T 1C -Dcardforge-repo.username=${{ secrets.FTP_USERNAME }} -Dcardforge-repo.password=${{ secrets.FTP_PASSWORD }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload Snapshot somewhere useful
uses: actions/upload-artifact@v3
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- name: Rename before upload
run: |
mkdir tarball
# If this works just gotta figure out how to append datetime
mv /home/runner/.m2/repository/forge/forge-gui-desktop/*/*.bz2 tarball/
cd tarball
out="$(basename -s .tar.bz2 *)"
d=$(date +%m-%d)
mv "${out}.tar.bz2" "${out}-${d}.tar.bz2"
- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
with:
name: latest_desktop_snapshot.bz2
path: /home/runner/.m2/repository/forge/forge-gui-desktop/**/forge-gui-desktop-*.tar.bz2
server: ftp.cardforge.org
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
local-dir: tarball/
server-dir: downloads/dailysnapshots/
exclude: |
*.jar
*.pom
*.repositories
*.xml