2024-08-25 18:49:34 +08:00
|
|
|
name: "Build migrate_gse script (Linux)"
|
2024-04-20 11:15:11 +08:00
|
|
|
|
|
|
|
on:
|
2024-05-11 22:17:02 +08:00
|
|
|
workflow_call:
|
|
|
|
# needed since it allows this to become a reusable workflow
|
2024-04-20 11:15:11 +08:00
|
|
|
workflow_dispatch:
|
|
|
|
# allows manual trigger
|
|
|
|
|
|
|
|
permissions:
|
2024-08-25 18:49:34 +08:00
|
|
|
contents: "write"
|
2024-04-20 11:15:11 +08:00
|
|
|
|
|
|
|
env:
|
|
|
|
ARTIFACT_NAME: "migrate_gse-linux-${{ github.sha }}"
|
|
|
|
SCRIPT_BASE_DIR: "tools/migrate_gse"
|
2024-05-11 22:17:02 +08:00
|
|
|
PACKAGE_BASE_DIR: "tools/migrate_gse/bin/linux"
|
2024-04-20 11:15:11 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2024-09-06 01:40:37 +08:00
|
|
|
runs-on: "ubuntu-20.04"
|
2024-04-20 11:15:11 +08:00
|
|
|
|
|
|
|
steps:
|
2024-08-25 18:49:34 +08:00
|
|
|
- name: "Checkout branch"
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
# fix folder permissions! not sure why this fails
|
|
|
|
# nested subdirs "build/linux/release" cause permission problems
|
|
|
|
- name: "Give all permissions to repo folder"
|
|
|
|
shell: "bash"
|
|
|
|
working-directory: "${{ github.workspace }}"
|
|
|
|
run: sudo chmod -R 777 "${{ github.workspace }}"
|
|
|
|
|
|
|
|
# env
|
|
|
|
- name: "Install env"
|
|
|
|
shell: "bash"
|
|
|
|
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
|
|
|
|
run: sudo chmod 777 recreate_venv_linux.sh && sudo ./recreate_venv_linux.sh
|
|
|
|
|
|
|
|
# build
|
|
|
|
- name: "Rebuild"
|
|
|
|
shell: "bash"
|
|
|
|
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
|
|
|
|
run: sudo chmod 777 rebuild_linux.sh && ./rebuild_linux.sh
|
|
|
|
|
|
|
|
# upload artifact
|
|
|
|
- name: "Upload build package"
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: "${{ env.ARTIFACT_NAME }}"
|
|
|
|
path: "${{ env.PACKAGE_BASE_DIR }}/"
|
|
|
|
if-no-files-found: "error"
|
|
|
|
compression-level: 9
|
|
|
|
retention-days: 1
|