Publish server dmg to release artifacts
Summary: ^ Reviewed By: passy Differential Revision: D49544230 fbshipit-source-id: 908a5d7c759bcbcef34c262ab588500fc87cb463
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a4933373b5
commit
9e98391151
50
.github/workflows/release.yml
vendored
50
.github/workflows/release.yml
vendored
@@ -77,6 +77,41 @@ jobs:
|
|||||||
name: 'Flipper-mac.dmg'
|
name: 'Flipper-mac.dmg'
|
||||||
path: 'dist/Flipper-mac.dmg'
|
path: 'dist/Flipper-mac.dmg'
|
||||||
|
|
||||||
|
build-server-mac:
|
||||||
|
needs:
|
||||||
|
- release
|
||||||
|
runs-on: macos-latest
|
||||||
|
env:
|
||||||
|
desktop-directory: ./desktop
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3.5.3
|
||||||
|
with:
|
||||||
|
ref: ${{ needs.release.outputs.tag }}
|
||||||
|
- uses: actions/setup-node@v3.6.0
|
||||||
|
with:
|
||||||
|
node-version: '18.x'
|
||||||
|
- name: Install
|
||||||
|
uses: nick-invision/retry@v2.0.0
|
||||||
|
with:
|
||||||
|
timeout_minutes: 10
|
||||||
|
max_attempts: 3
|
||||||
|
command: cd ${{env.desktop-directory}} && yarn
|
||||||
|
- name: Build
|
||||||
|
run: cd ${{env.desktop-directory}} && yarn build:flipper-server --mac --dmg
|
||||||
|
- name: List dist artifacts
|
||||||
|
run: ls -l dist/
|
||||||
|
- name: Upload x86-64
|
||||||
|
uses: actions/upload-artifact@v3.1.2
|
||||||
|
with:
|
||||||
|
name: 'Flipper-server-mac-x64.dmg'
|
||||||
|
path: 'dist/Flipper-server-mac-x64.dmg'
|
||||||
|
- name: Upload aarch64
|
||||||
|
uses: actions/upload-artifact@v3.1.2
|
||||||
|
with:
|
||||||
|
name: 'Flipper-server-mac-aarch64.dmg'
|
||||||
|
path: 'dist/Flipper-server-mac-aarch64.dmg'
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
needs:
|
needs:
|
||||||
- release
|
- release
|
||||||
@@ -178,6 +213,7 @@ jobs:
|
|||||||
- build-win
|
- build-win
|
||||||
- build-linux
|
- build-linux
|
||||||
- build-mac
|
- build-mac
|
||||||
|
- build-server-mac
|
||||||
- build-flipper-server
|
- build-flipper-server
|
||||||
- release
|
- release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -192,6 +228,18 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: 'Flipper-mac.dmg'
|
name: 'Flipper-mac.dmg'
|
||||||
path: 'Flipper-mac.dmg'
|
path: 'Flipper-mac.dmg'
|
||||||
|
- name: Download Flipper Server x86-64
|
||||||
|
if: ${{ needs.release.outputs.tag != '' }}
|
||||||
|
uses: actions/download-artifact@v1
|
||||||
|
with:
|
||||||
|
name: 'Flipper-server-mac-x64.dmg'
|
||||||
|
path: 'Flipper-server-mac-x64.dmg'
|
||||||
|
- name: Download Flipper Server aarch64
|
||||||
|
if: ${{ needs.release.outputs.tag != '' }}
|
||||||
|
uses: actions/download-artifact@v1
|
||||||
|
with:
|
||||||
|
name: 'Flipper-server-mac-aarch64.dmg'
|
||||||
|
path: 'Flipper-server-mac-aarch64.dmg'
|
||||||
- name: Download Linux
|
- name: Download Linux
|
||||||
if: ${{ needs.release.outputs.tag != '' }}
|
if: ${{ needs.release.outputs.tag != '' }}
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v1
|
||||||
@@ -217,7 +265,7 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
created_tag: ${{ needs.release.outputs.tag }}
|
created_tag: ${{ needs.release.outputs.tag }}
|
||||||
args: Flipper-mac.dmg/Flipper-mac.dmg Flipper-linux.zip/Flipper-linux.zip Flipper-win.zip/Flipper-win.zip flipper-server.tgz/flipper-server.tgz
|
args: Flipper-mac.dmg/Flipper-mac.dmg Flipper-linux.zip/Flipper-linux.zip Flipper-win.zip/Flipper-win.zip flipper-server.tgz/flipper-server.tgz Flipper-server-mac-x64.dmg/Flipper-server-mac-x64.dmg Flipper-server-mac-aarch64.dmg/Flipper-server-mac-aarch64.dmg
|
||||||
- name: Set up npm token
|
- name: Set up npm token
|
||||||
run: echo "//registry.yarnpkg.com/:_authToken=${{ secrets.FLIPPER_NPM_TOKEN }}" >> ~/.npmrc
|
run: echo "//registry.yarnpkg.com/:_authToken=${{ secrets.FLIPPER_NPM_TOKEN }}" >> ~/.npmrc
|
||||||
- name: Publish flipper-server on NPM
|
- name: Publish flipper-server on NPM
|
||||||
|
|||||||
@@ -614,7 +614,7 @@ async function createMacDMG(
|
|||||||
) {
|
) {
|
||||||
console.log(`⚙️ Create macOS DMG from: ${outputPath}`);
|
console.log(`⚙️ Create macOS DMG from: ${outputPath}`);
|
||||||
|
|
||||||
const name = `Flipper-${platform}.dmg`;
|
const name = `Flipper-server-${platform}.dmg`;
|
||||||
const temporaryDirectory = os.tmpdir();
|
const temporaryDirectory = os.tmpdir();
|
||||||
|
|
||||||
const dmgOutputPath = path.resolve(temporaryDirectory, name);
|
const dmgOutputPath = path.resolve(temporaryDirectory, name);
|
||||||
@@ -623,7 +623,6 @@ async function createMacDMG(
|
|||||||
|
|
||||||
const dmgPath = path.resolve(destPath, name);
|
const dmgPath = path.resolve(destPath, name);
|
||||||
|
|
||||||
// const dmgPath = `${destPath}/${name}`;
|
|
||||||
const cmd = `hdiutil create -format UDZO -srcfolder "${outputPath}/" -volname "Flipper" ${dmgOutputPath}`;
|
const cmd = `hdiutil create -format UDZO -srcfolder "${outputPath}/" -volname "Flipper" ${dmgOutputPath}`;
|
||||||
|
|
||||||
return new Promise<void>((resolve, reject) => {
|
return new Promise<void>((resolve, reject) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user