Skip to content

1.2.1.0: Server QoL improvements, deployment updates (#4) #72

1.2.1.0: Server QoL improvements, deployment updates (#4)

1.2.1.0: Server QoL improvements, deployment updates (#4) #72

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Build Mac Binaries
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: macos-latest
defaults:
run:
working-directory: ./server
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: "npm"
node-version-file: "./server/.nvmrc"
cache-dependency-path: "server/package-lock.json"
- uses: jozsefsallai/[email protected]
with:
path: server/package.json
- uses: benjlevesque/[email protected]
- run: npm ci
working-directory: ./server
- run: npm run build:macos
working-directory: ./server
- name: archive
run: for platform in "macos/x64";do cd $platform; tar -cvzf ../../spotify97-server-$(echo $platform | tr "/" "-")-$(npm pkg get version | tr -d '"')-${{ env.SHA }}.tar.gz .;cd ../../;done;ls -la
working-directory: ./server/dist
- uses: actions/upload-artifact@v4
with:
name: macos-binary-${{ env.SHA }}
path: server/dist/spotify97-server-macos-x64-${{ env.PACKAGE_VERSION }}-${{ env.SHA }}.tar.gz
upload:
runs-on: ubuntu-latest
needs: "build"
steps:
- uses: actions/checkout@v4
- uses: jozsefsallai/[email protected]
with:
path: server/package.json
- uses: benjlevesque/[email protected]
- uses: actions/download-artifact@v4
with:
name: macos-binary-${{ env.SHA }}
path: .
- run: ls -la
- name: upload
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
port: ${{ secrets.PORT }}
key: ${{ secrets.KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
source: "spotify97-server-macos-x64-${{env.PACKAGE_VERSION}}-${{ env.SHA }}.tar.gz"
target: /srv/www/public/spotifyclient97/downloads/server/${{ env.PACKAGE_VERSION }}/${{ env.SHA }}/