summaryrefslogtreecommitdiffstats
path: root/.github/workflows/build.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r--.github/workflows/build.yml47
1 files changed, 24 insertions, 23 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 74cf792483..02817fe8dd 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -95,8 +95,8 @@ jobs:
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
outputs:
- artifact-macos-macosintel: ${{ steps.generate_artifact_metadata.outputs.artifact-macos-macosintel }}
- artifact-windows-windows64: ${{ steps.generate_artifact_metadata.outputs.artifact-windows-windows64 }}
+ artifact-macos-macosintel: ${{ steps.prepare_deploy.outputs.artifact-macos-macosintel }}
+ artifact-windows-windows64: ${{ steps.prepare_deploy.outputs.artifact-windows-windows64 }}
steps:
# sccache's handling of the /fp:fast MSVC compiler option is broken, so use our fork with the fix.
@@ -306,6 +306,21 @@ jobs:
run: signtool sign /f $Env:WINDOWS_CODESIGN_CERTIFICATE_PATH /p $Env:WINDOWS_CODESIGN_CERTIFICATE_PASSWORD *.msi
working-directory: build
+ - name: "Prepare for deployment"
+ # Copy the desired directory structure to the deploy/ directory. This
+ # also generates metadata for file artifact and write it to the job
+ # output using the artifacts_slug value.
+ id: prepare_deploy
+ if: github.event_name == 'push'
+ shell: bash
+ run: >
+ python3 tools/deploy.py prepare-deployment
+ --slug '${{ matrix.artifacts_slug }}'
+ --output-dir 'deploy/'
+ --dest-path 'builds/{branch}/${{ runner.os }}/{filename}'
+ --dest-url 'https://downloads.mixxx.org'
+ ${{ matrix.artifacts_path }}
+
- name: "[Windows] Install rsync and openssh"
env:
SSH_PASSWORD: ${{ secrets.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD }}
@@ -315,30 +330,16 @@ jobs:
pacman -S --noconfirm coreutils bash rsync openssh
Add-Content -Path "$Env:GITHUB_ENV" -Value "PATH=$Env:PATH"
- - name: "Generate Artifact Metadata"
- # Generate metadata for file artifact and write it to the job output
- # using the artifacts_slug value. This also sets the DEPLOY_DIR
- # environment variable that is used in the deploy.sh script in the next
- # step.
- id: generate_artifact_metadata
- if: github.event_name == 'push'
- run: python3 tools/generate_download_metadata.py artifact ${{ matrix.artifacts_path }} "${{ matrix.artifacts_slug }}"
- env:
- DEPLOY_BASEURL: "https://downloads.mixxx.org"
- DESTDIR: builds/{git_branch}/${{ runner.os }}
-
- name: "[macOS/Windows] Upload build to downloads.mixxx.org"
# skip deploying Ubuntu builds to downloads.mixxx.org because these are deployed to the PPA
if: runner.os != 'Linux' && github.event_name == 'push' && env.SSH_PASSWORD != null
- run: bash tools/deploy.sh ${{ matrix.artifacts_path }}
+ run: bash tools/deploy.sh deploy/
env:
DESTDIR: public_html/downloads/
- DEPLOY_ONLY: 0
SSH_HOST: downloads-hostgator.mixxx.org
SSH_KEY: packaging/certificates/downloads-hostgator.mixxx.org.key
SSH_PASSWORD: ${{ secrets.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD }}
SSH_USER: mixxx
- UPLOAD_ID: ${{ github.run_id }}
# Workaround for https://github.com/actions/cache/issues/531
- name: Use system tar & zstd from Chocolatey for caching
@@ -367,24 +368,24 @@ jobs:
# Retrieve the metadata from the matrix job's outputs, merge them into a
# single JSON document and then deploy to the server.
if: github.event_name == 'push' && env.SSH_PASSWORD != null
- run: python3 tools/generate_download_metadata.py manifest
+ run: >
+ python3 tools/deploy.py generate-manifest
+ --output-dir 'deploy/'
+ --dest-path 'builds/{branch}/manifest.json'
+ --dest-url 'https://downloads.mixxx.org'
env:
JOB_DATA: ${{ toJSON(needs.build) }}
- MANIFEST_URL: "https://downloads.mixxx.org/builds/{git_branch}/manifest.json"
- DESTDIR: "builds/{git_branch}"
SSH_PASSWORD: ${{ secrets.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD }}
- name: "Deploy Manifest"
if: github.event_name == 'push' && env.SSH_PASSWORD != null && env.MANIFEST_DIRTY != null && env.MANIFEST_DIRTY != '0'
- run: bash tools/deploy.sh manifest.json
+ run: bash tools/deploy.sh deploy/
env:
DESTDIR: public_html/downloads/
- DEPLOY_ONLY: 1
SSH_HOST: downloads-hostgator.mixxx.org
SSH_KEY: packaging/certificates/downloads-hostgator.mixxx.org.key
SSH_PASSWORD: ${{ secrets.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD }}
SSH_USER: mixxx
- UPLOAD_ID: ${{ github.run_id }}
- name: "Trigger Netlify build"
if: env.NETLIFY_BUILD_HOOK != null && env.MANIFEST_DIRTY != null && env.MANIFEST_DIRTY != '0'