-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
queenkjuul
committed
Nov 7, 2024
1 parent
00a2936
commit d5934dd
Showing
1 changed file
with
49 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,47 +5,61 @@ name: Build Mac Binaries | |
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
branches: ["main"] | ||
pull_request: | ||
branches: [ "main" ] | ||
branches: ["main"] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: macos-latest | ||
defaults: | ||
run: | ||
working-directory: ./server | ||
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 '"').tar.gz .;cd ../../;done;ls -la | ||
working-directory: ./server/dist | ||
- name: upload | ||
uses: appleboy/[email protected] | ||
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 | ||
|
||
|
||
|
||
- 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 '"').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 }}.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: "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 |