Build and Deploy

build and collect the artifacts then deploy once all builds complete

Add rclone setup
master
Beq 2023-04-28 09:56:42 +01:00
parent 5aeae33677
commit 650404903d
1 changed files with 33 additions and 37 deletions

View File

@ -74,18 +74,19 @@ jobs:
- name: find channel from Branch name
run: |
if [[ "${{ github.ref_name }}" == *Release* ]]; then
FS_RELEASE_CHAN="Release"
FS_RELEASE_TYPE=Release
else
if [[ "${{github.event_name}}" == 'schedule' ]]; then
FS_RELEASE_CHAN="Nightly"
FS_RELEASE_TYPE=Nightly
else
FS_RELEASE_CHAN="Beta"
FS_RELEASE_TYPE=Beta
fi
fi
if [[ "${{ matrix.addrsize }}" == "64" ]]; then
FS_RELEASE_CHAN="${FS_RELEASE_CHAN}x64"
FS_RELEASE_CHAN="${FS_RELEASE_TYPE}x64"
fi
echo "FS_RELEASE_CHAN=\"${FS_RELEASE_CHAN}\"" >> $GITHUB_ENV
echo "FS_RELEASE_TYPE=${FS_RELEASE_TYPE}" >> $GITHUB_ENV
echo "FS_RELEASE_CHAN=${FS_RELEASE_CHAN}" >> $GITHUB_ENV
echo "Building for channel ${FS_RELEASE_CHAN}"
shell: bash
@ -203,39 +204,34 @@ jobs:
- name: build
run: autobuild build --debug -c ReleaseFS -A${{matrix.addrsize}} --no-configure
shell: bash
- name: Prep Nightly Build for deploy
if: github.event_name == 'schedule'
- name: Publish artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.FS_RELEASE_TYPE }}-${{ matrix.os }}-${{ matrix.addrsize }}-${{ matrix.grid }}-artifacts.zip
path: |
build-*/newview/Release/*Setup.exe
build-*/newview/Release/*.xz
build-linux-*/newview/*.bz2
build-darwin-*/newview/*.dmg
deploy:
runs-on: ubuntu-latest
needs: build_matrix
if: always()
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
id: download
with:
name: ${{ matrix.os }}-${{matrix.addrsize}}-${{matrix.grid}}-artifacts.zip
path: |
${{ if eq(runner.os, 'Windows') }}:
build-*/newview/Release/*Setup.exe
build-*/newview/Release/*.xz
${{ if eq(runner.os, 'Linux') }}:
build-linux-*/newview/*.xz
build-linux-*/newview/*.bz2
${{ if eq(runner.os, 'macOS') }}:
build-darwin-*/newview/*.dmg
build-darwin-*/newview/*.bz2
- name: Deploy Nightly to server
- name: publish artifacts
if: github.event_name == 'push'
uses: actions/upload-artifact@v3
path: to_deploy
- name: List artifacts download
run: ls -R
working-directory: ${{steps.download.outputs.download-path}}
- name: Setup rclone and download the folder
uses: beqjanus/setup-rclone@main
with:
name: ${{ matrix.os }}-${{matrix.addrsize}}-${{matrix.grid}}-artifacts.zip
path: |
${{ if eq(runner.os, 'Windows') }}:
build-*/newview/Release/*Setup.exe
build-*/newview/Release/*.xz
${{ if eq(runner.os, 'Linux') }}:
build-linux-*/newview/*.xz
build-linux-*/newview/*.bz2
${{ if eq(runner.os, 'macOS') }}:
build-darwin-*/newview/*.dmg
build-darwin-*/newview/*.bz2
rclone_config: ${{ secrets.RCLONE_CONFIG }}
- name: Copy files to remote host
run: rclone copy ${{steps.download.outputs.download-path}} fs_deploy:test/