mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-12-31 04:44:16 +08:00
90b403fb3d
+ add steps: package + release to add packaged build to release when pushing on tag + support building on prefixed branch name with wildcard + support event trigger on tag + support event trigger on workflow dispatch for manual trigger
61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
name: Generate emu config script (Linux)
|
|
|
|
on:
|
|
push:
|
|
branches: [
|
|
"ci-build-gen-linux*",
|
|
"ci-build-all"
|
|
]
|
|
tags:
|
|
- release*
|
|
pull_request:
|
|
branches: [ "dev" ]
|
|
workflow_dispatch:
|
|
# nothing
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
env:
|
|
ARTIFACT_NAME: "generate_emu_config-linux-${{ github.sha }}"
|
|
ARTIFACT_ROOT_PATH: "scripts/bin/linux"
|
|
PACKAGE_ROOT_PATH: "scripts/bin/package"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
- name: Checkout branch
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
shell: bash
|
|
working-directory: ${{ github.workspace }}/scripts
|
|
run: sudo chmod 77 recreate_venv_linux.sh && sudo ./recreate_venv_linux.sh
|
|
|
|
- name: Rebuild
|
|
shell: bash
|
|
working-directory: ${{ github.workspace }}/scripts
|
|
run: sudo chmod 77 rebuild_linux.sh && sudo ./rebuild_linux.sh
|
|
|
|
- name: Package build
|
|
shell: bash
|
|
working-directory: ${{ github.workspace }}/scripts
|
|
run: sudo chmod 77 package_linux.sh && sudo ./package_linux.sh
|
|
|
|
- name: Upload build package
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: "${{ env.ARTIFACT_NAME }}"
|
|
path: "${{ env.PACKAGE_ROOT_PATH }}/linux/"
|
|
if-no-files-found: 'error'
|
|
compression-level: 9
|
|
retention-days: 1
|
|
|
|
- name: Release
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: "${{ env.PACKAGE_ROOT_PATH }}/**/*"
|
|
|