Build and Release bsky-desktop #1
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
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 | |
outputs: | |
artifact: ${{ steps.upload-artifact.outputs.artifact }} | |
env: | |
ext: ".AppImage" | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout git repo | |
uses: actions/checkout@v3 | |
- name: Setup node and npm | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install dependencies | |
run: npm install | |
- name: Build (x64) | |
run: npm run build -- --arch x64 | |
- name: Build (arm64) | |
run: npm run build -- --arch arm64 | |
- name: Upload Linux Artifacts | |
uses: actions/upload-artifact@v4 | |
id: upload-artifact | |
with: | |
name: linux-artifacts | |
path: | | |
dist/*.AppImage | |
dist/latest-linux.yml | |
build-windows: | |
name: Build bsky-desktop (Windows) | |
runs-on: windows-latest | |
outputs: | |
artifact: ${{ steps.upload-artifact.outputs.artifact }} | |
env: | |
ext: ".exe" | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout git repo | |
uses: actions/checkout@v3 | |
- name: Setup node and npm | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install dependencies | |
run: npm install | |
- name: Build (x64) | |
run: npm run build -- --arch x64 | |
- name: Build (arm64) | |
run: npm run build -- --arch arm64 | |
- name: Upload Windows Artifacts | |
uses: actions/upload-artifact@v4 | |
id: upload-artifact | |
with: | |
name: windows-artifacts | |
path: | | |
dist/*.exe | |
dist/latest-windows.yml | |
build-macos: | |
name: Build bsky-desktop (macOS) | |
runs-on: macos-latest | |
outputs: | |
artifact: ${{ steps.upload-artifact.outputs.artifact }} | |
env: | |
ext: ".dmg" | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout git repo | |
uses: actions/checkout@v3 | |
- name: Setup node and npm | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install dependencies | |
run: npm install | |
- name: Build (x64) | |
run: npm run build -- --arch x64 | |
- name: Build (arm64) | |
run: npm run build -- --arch arm64 | |
- name: Upload macOS Artifacts | |
uses: actions/upload-artifact@v4 | |
id: upload-artifact | |
with: | |
name: macos-artifacts | |
path: | | |
dist/*.dmg | |
dist/latest-macos.yml | |
release: | |
name: Create Release | |
runs-on: ubuntu-latest | |
needs: [build-linux, build-windows, build-macos] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout git repo | |
uses: actions/checkout@v2 | |
- name: Get app version | |
id: version | |
uses: pchynoweth/action-get-npm-version@1.0.1 | |
- name: Download Linux Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: linux-artifacts | |
path: dist/linux | |
- name: Download Windows Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: windows-artifacts | |
path: dist/windows | |
- name: Download macOS Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: macos-artifacts | |
path: dist/macos | |
- name: Display structure of downloaded files | |
run: ls -R && ls -R dist && ls -R dist/linux && ls -R dist/windows && ls -R dist/macos | |
- name: Upload Release | |
id: create_release | |
uses: qnblackcat/action-gh-release@master | |
with: | |
tag_name: "v${{ steps.version.outputs.version }}" | |
name: "bsky-desktop v${{ steps.version.outputs.version }}" | |
files: | | |
dist/linux/*.AppImage | |
dist/linux/latest-linux.yml | |
dist/windows/*.exe | |
dist/windows/latest-windows.yml | |
dist/macos/*.dmg | |
dist/macos/latest-macos.yml |