fix release workflow + allow manual trigger for testing

This commit is contained in:
otavepto 2024-05-31 15:34:28 +03:00
parent d6495a8831
commit 596706fea9
3 changed files with 77 additions and 9 deletions

View File

@ -110,8 +110,8 @@ jobs:
echo "actual run..."
make -j 2 config=${{ matrix.cfg }}_${{ matrix.arch }} ${{ matrix.prj }}
### upload artifact/package to github Actions (for targets)
- name: Upload build package (for targets)
### upload artifact/package to github Actions
- name: Upload target package
uses: actions/upload-artifact@v4
with:
name: "emu-linux-${{ matrix.prj }}-${{ matrix.cfg }}-${{ matrix.arch }}-${{ github.sha }}"

View File

@ -99,8 +99,8 @@ jobs:
run: |
msbuild /nologo /target:${{ matrix.prj }} /m:2 /v:n /p:Configuration=${{ matrix.cfg }},Platform=${{ matrix.arch }} gbe.sln
### upload artifact/package to github Actions (for targets)
- name: Upload build package (for targets)
### upload artifact/package to github Actions
- name: Upload target package
uses: actions/upload-artifact@v4
with:
name: "emu-win-${{ matrix.prj }}-${{ matrix.cfg }}-${{ matrix.arch }}-${{ github.sha }}"

View File

@ -3,7 +3,9 @@ name: Prepare release
on:
push:
tags:
- release*
- release-*
workflow_dispatch:
# allows manual trigger
permissions:
contents: write
@ -52,13 +54,13 @@ jobs:
- name: Package build (release)
shell: cmd
working-directory: ${{ github.workspace }}
run: package_win.bat release
run: package_win.bat vs2022\release
### package (debug mode)
- name: Package build (debug)
shell: cmd
working-directory: ${{ github.workspace }}
run: package_win.bat debug
run: package_win.bat vs2022\debug
### release (debug + release modes) if this is a tag push
- name: Release
@ -67,6 +69,17 @@ jobs:
with:
files: "build/package/win/**/*"
### upload artifact/package if this is a manual run
- name: Upload release package
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v4
with:
name: "release-emu-win-${{ github.sha }}"
path: "build/package/win/**/*"
if-no-files-found: 'error'
compression-level: 9
retention-days: 1
emu-linux-all:
@ -107,13 +120,13 @@ jobs:
- name: Package build (release)
shell: bash
working-directory: ${{ github.workspace }}
run: sudo ./package_linux.sh release
run: sudo ./package_linux.sh gmake2/release
### package (debug mode)
- name: Package build (debug)
shell: bash
working-directory: ${{ github.workspace }}
run: sudo ./package_linux.sh debug
run: sudo ./package_linux.sh gmake2/debug
### release (debug + release modes) if this is a tag push
- name: Release
@ -122,6 +135,17 @@ jobs:
with:
files: "build/package/linux/**/*"
### upload artifact/package if this is a manual run
- name: Upload release package
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v4
with:
name: "release-emu-linux-${{ github.sha }}"
path: "build/package/linux/**/*"
if-no-files-found: 'error'
compression-level: 9
retention-days: 1
gen_emu_script-win:
@ -173,6 +197,17 @@ jobs:
with:
files: "tools/generate_emu_config/bin/package/win/**/*"
### upload artifact/package if this is a manual run
- name: Upload release package
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v4
with:
name: "release-generate_emu_config-win-${{ github.sha }}"
path: "tools/generate_emu_config/bin/package/win/**/*"
if-no-files-found: 'error'
compression-level: 9
retention-days: 1
gen_emu_script-linux:
@ -216,6 +251,17 @@ jobs:
with:
files: "tools/generate_emu_config/bin/package/linux/**/*"
### upload artifact/package if this is a manual run
- name: Upload release package
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v4
with:
name: "release-generate_emu_config-linux-${{ github.sha }}"
path: "tools/generate_emu_config/bin/package/linux/**/*"
if-no-files-found: 'error'
compression-level: 9
retention-days: 1
migrate_gse_script-win:
@ -267,6 +313,17 @@ jobs:
with:
files: "tools/migrate_gse/bin/package/win/**/*"
### upload artifact/package if this is a manual run
- name: Upload release package
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v4
with:
name: "release-migrate_gse-win-${{ github.sha }}"
path: "tools/migrate_gse/bin/package/win/**/*"
if-no-files-found: 'error'
compression-level: 9
retention-days: 1
migrate_gse_script-linux:
@ -310,5 +367,16 @@ jobs:
with:
files: "tools/migrate_gse/bin/package/linux/**/*"
### upload artifact/package if this is a manual run
- name: Upload release package
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v4
with:
name: "release-migrate_gse-linux-${{ github.sha }}"
path: "tools/migrate_gse/bin/package/linux/**/*"
if-no-files-found: 'error'
compression-level: 9
retention-days: 1