Summary: Noticed that the icon download fails occasionally from GitHub. This adds a few retries in case that happens. Reviewed By: nikoant Differential Revision: D24647690 fbshipit-source-id: 3ed84cb0972b7715fd87c8b1e1e1bca9f89485a9
156 lines
4.2 KiB
YAML
156 lines
4.2 KiB
YAML
name: Release
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- 'desktop/package.json'
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
tag: ${{ steps.tag-version-commit.outputs.tag }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Tag version commit
|
|
id: tag-version-commit
|
|
uses: passy/tag-version-commit@v1.1.1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
version_tag_prefix: 'v'
|
|
version_assertion_command: 'grep -q "\"version\": \"$version\"" desktop/package.json'
|
|
- name: Create release
|
|
if: ${{ steps.tag-version-commit.outputs.tag != '' }}
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: ${{ steps.tag-version-commit.outputs.tag }}
|
|
release_name: ${{ steps.tag-version-commit.outputs.tag }}
|
|
body: |
|
|
See https://github.com/facebook/flipper/blob/master/desktop/static/CHANGELOG.md
|
|
for full notes.
|
|
draft: false
|
|
prerelease: false
|
|
|
|
build-mac:
|
|
runs-on: macos-latest
|
|
env:
|
|
desktop-directory: ./desktop
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '12.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
|
|
uses: nick-invision/retry@v2.0.0
|
|
with:
|
|
timeout_minutes: 30
|
|
max_attempts: 3
|
|
command: cd ${{env.desktop-directory}} && yarn build --mac --mac-dmg
|
|
- name: Upload
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: 'Flipper-mac.dmg'
|
|
path: 'dist/Flipper-mac.dmg'
|
|
|
|
build-linux:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
desktop-directory: ./desktop
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '12.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
|
|
uses: nick-invision/retry@v2.0.0
|
|
with:
|
|
timeout_minutes: 30
|
|
max_attempts: 3
|
|
command: cd ${{env.desktop-directory}} && yarn build --linux
|
|
- name: Upload Linux
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: 'Flipper-linux.zip'
|
|
path: 'dist/Flipper-linux.zip'
|
|
|
|
build-win:
|
|
runs-on: windows-latest
|
|
env:
|
|
desktop-directory: ./desktop
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '12.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
|
|
uses: nick-invision/retry@v2.0.0
|
|
with:
|
|
timeout_minutes: 30
|
|
max_attempts: 3
|
|
command: cd ${{env.desktop-directory}} && yarn build --win
|
|
- name: Upload Windows
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: 'Flipper-win.zip'
|
|
path: 'dist/Flipper-win.zip'
|
|
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- build-win
|
|
- build-linux
|
|
- build-mac
|
|
- release
|
|
|
|
steps:
|
|
- name: Download Mac
|
|
if: ${{ needs.release.outputs.tag != '' }}
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: 'Flipper-mac.dmg'
|
|
path: 'Flipper-mac.dmg'
|
|
- name: Download Linux
|
|
if: ${{ needs.release.outputs.tag != '' }}
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: 'Flipper-linux.zip'
|
|
path: 'Flipper-linux.zip'
|
|
- name: Download Windows
|
|
if: ${{ needs.release.outputs.tag != '' }}
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: 'Flipper-win.zip'
|
|
path: 'Flipper-win.zip'
|
|
- name: GitHub Upload Release Artifacts
|
|
if: ${{ needs.release.outputs.tag != '' }}
|
|
uses: passy/github-upload-release-artifacts-action@v2.1.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
created_tag: ${{ needs.release.outputs.tag }}
|
|
args: Flipper-mac.dmg Flipper-linux.zip Flipper-win.zip
|