mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 12:21:35 +00:00
Use v4 actions
This commit is contained in:
56
.github/workflows/build.yml
vendored
56
.github/workflows/build.yml
vendored
@@ -94,7 +94,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -108,12 +108,12 @@ jobs:
|
|||||||
|
|
||||||
- name: Cache multiple paths
|
- name: Cache multiple paths
|
||||||
if: matrix.goal == 'build'
|
if: matrix.goal == 'build'
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
id: cache-python-ssl
|
id: cache-python-ssl
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
cache.tar.xz
|
cache.tar.xz
|
||||||
key: gam-${{ matrix.jid }}-20240209a
|
key: gam-${{ matrix.jid }}-20240210
|
||||||
|
|
||||||
- name: Untar Cache archive
|
- name: Untar Cache archive
|
||||||
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true'
|
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true'
|
||||||
@@ -154,6 +154,15 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
echo "GAMCFGDIR=${GAMCFGDIR}" >> $GITHUB_ENV
|
echo "GAMCFGDIR=${GAMCFGDIR}" >> $GITHUB_ENV
|
||||||
echo "GAMCFGDIR is: ${GAMCFGDIR}"
|
echo "GAMCFGDIR is: ${GAMCFGDIR}"
|
||||||
|
if [[ "${RUNNER_OS}" == "macOS" ]]; then
|
||||||
|
GAMOS="macos"
|
||||||
|
elif [[ "${RUNNER_OS}" == "Linux" ]]; then
|
||||||
|
GAMOS="linux"
|
||||||
|
elif [[ "${RUNNER_OS}" == "Windows" ]]; then
|
||||||
|
GAMOS="windows"
|
||||||
|
else
|
||||||
|
GAMOS='unknown'
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Set env variables for test
|
- name: Set env variables for test
|
||||||
if: matrix.goal == 'test'
|
if: matrix.goal == 'test'
|
||||||
@@ -825,16 +834,6 @@ jobs:
|
|||||||
$gam delete printer "$printerid"
|
$gam delete printer "$printerid"
|
||||||
$gam delete ou "${newou}"
|
$gam delete ou "${newou}"
|
||||||
|
|
||||||
- name: Archive production artifacts
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
if: (github.event_name == 'push' || github.event_name == 'schedule') && matrix.goal != 'test'
|
|
||||||
with:
|
|
||||||
name: gam-binaries
|
|
||||||
path: |
|
|
||||||
src/*.tar.xz
|
|
||||||
src/*.zip
|
|
||||||
src/*.msi
|
|
||||||
|
|
||||||
- name: Tar Cache archive
|
- name: Tar Cache archive
|
||||||
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit != 'true'
|
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit != 'true'
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
@@ -846,10 +845,35 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
tar cJvvf cache.tar.xz $tar_folders
|
tar cJvvf cache.tar.xz $tar_folders
|
||||||
|
|
||||||
|
- name: Archive production artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
if: (github.event_name == 'push' || github.event_name == 'schedule') && matrix.goal != 'test'
|
||||||
|
with:
|
||||||
|
name: gam-binaries-${{ env.GAMOS }}-${{ env.arch }}
|
||||||
|
path: |
|
||||||
|
src/*.tar.xz
|
||||||
|
src/*.zip
|
||||||
|
src/*.msi
|
||||||
|
|
||||||
|
merge:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- name: Merge Artifacts
|
||||||
|
uses: actions/upload-artifact/merge@v4
|
||||||
|
with:
|
||||||
|
name: gam-binaries
|
||||||
|
pattern: gam-binaries-*
|
||||||
|
|
||||||
|
- name: Delete Artifacts
|
||||||
|
uses: geekyeggo/delete-artifact@v4
|
||||||
|
with:
|
||||||
|
name: gam-binaries-*
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs: merge
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
packages: write
|
packages: write
|
||||||
@@ -857,13 +881,13 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
|
|
||||||
- name: VirusTotal Scan
|
- name: VirusTotal Scan
|
||||||
uses: crazy-max/ghaction-virustotal@v3
|
uses: crazy-max/ghaction-virustotal@v3
|
||||||
|
|||||||
Reference in New Issue
Block a user