Skip to content

Commit

Permalink
Create build-macos.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
queenkjuul authored Nov 5, 2024
1 parent c330fff commit 3b65b9f
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# 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: ubuntu-latest
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
defaults:
run:
working-directory: ./server

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
node-version-file: './server/.nvmrc'
cache-dependency-path: 'server/package-lock.json'
- name: version
uses: jozsefsallai/node-package-version@v1.0.4
with:
path: server/package.json
- uses: benjlevesque/short-sha@v3.0
- name: install
run: npm ci
working-directory: ./server
- name: build
run: npm run build:all
working-directory: ./server
- name: archive
run: for platform in "macos/x64";do tar -cvzf spotify97-server-$(echo $platform | tr "/" "-")-$(npm pkg get version | tr -d '"').tar.gz $platform;done;ls -la
working-directory: ./server/dist
- name: upload
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
port: ${{ secrets.PORT }}
key: ${{ secrets.KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
source: "server/dist/spotify97-server-macos-x64-${{env.PACKAGE_VERSION}}.tar.gz"
target: /srv/www/public/spotifyclient97/server/${{ env.PACKAGE_VERSION }}/${{ env.SHA }}/
strip_components: 2



0 comments on commit 3b65b9f

Please sign in to comment.