153 lines
3.6 KiB
YAML
153 lines
3.6 KiB
YAML
name: Build and Release bsky-desktop
|
|
|
|
on:
|
|
push:
|
|
branches: [ $default-branch ]
|
|
pull_request:
|
|
branches: [ $default-branch ]
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build-linux:
|
|
name: Build bsky-desktop (Linux)
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
ext: ".AppImage"
|
|
|
|
steps:
|
|
- name: Checkout git repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup node and npm
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
|
|
- name: Get npm version action
|
|
id: npmv
|
|
uses: pchynoweth/action-get-npm-version@1.0.1
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Build (x64)
|
|
run: npm run build -- --arch x64
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Upload Linux Artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: linux-artifacts
|
|
path: dist/*.AppImage
|
|
|
|
build-windows:
|
|
name: Build bsky-desktop (Windows)
|
|
runs-on: windows-latest
|
|
env:
|
|
ext: ".exe"
|
|
|
|
steps:
|
|
- name: Checkout git repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup node and npm
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
|
|
- name: Get npm version action
|
|
id: npmv
|
|
uses: pchynoweth/action-get-npm-version@1.0.1
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Build (x64)
|
|
run: npm run build -- --arch x64
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Upload Windows Artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: windows-artifacts
|
|
path: dist/*.exe
|
|
|
|
build-macos:
|
|
name: Build bsky-desktop (macOS)
|
|
runs-on: macos-latest
|
|
env:
|
|
ext: ".dmg"
|
|
|
|
steps:
|
|
- name: Checkout git repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup node and npm
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
|
|
- name: Get npm version action
|
|
id: npmv
|
|
uses: pchynoweth/action-get-npm-version@1.0.1
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Build (x64)
|
|
run: npm run build -- --arch x64
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Upload macOS Artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: macos-artifacts
|
|
path: dist/*.dmg
|
|
|
|
release:
|
|
name: Create Release
|
|
runs-on: ubuntu-latest
|
|
needs: [build-linux, build-windows, build-macos]
|
|
|
|
steps:
|
|
- name: Download Linux Artifacts
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: linux-artifacts
|
|
path: dist/linux
|
|
|
|
- name: Download Windows Artifacts
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: windows-artifacts
|
|
path: dist/windows
|
|
|
|
- name: Download macOS Artifacts
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: macos-artifacts
|
|
path: dist/macos
|
|
|
|
# - name: Get npm version action
|
|
# id: npmv
|
|
# uses: pchynoweth/action-get-npm-version@1.0.1
|
|
|
|
- name: Upload Release
|
|
id: create_release
|
|
uses: qnblackcat/action-gh-release@master
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: "v${{ steps.npmv.outputs.version }}"
|
|
name: "bsky-desktop v${{ steps.npmv.outputs.version }}"
|
|
files: |
|
|
dist/linux/*.AppImage
|
|
dist/windows/*.exe
|
|
dist/macos/*.dmg |