Skip to content

Build and publish

Build and publish #42

Workflow file for this run

name: Build and publish
on:
workflow_run:
workflows: [Tests]
types: completed
jobs:
build:
runs-on: ${{ matrix.os }}
if: github.event.workflow_run.conclusion == 'success' && github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install Snapcraft
# TODO: Bump after we're sure it works with samuelmeuli/action-electron-builder@v1
uses: samuelmeuli/action-snapcraft@v1
if: startsWith(matrix.os, 'ubuntu')
- name: Build & publish Caprine
# TODO: Upgrade action in fork https://github.com/dusansimic/action-electron-builder
uses: samuelmeuli/action-electron-builder@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
mac_certs: ${{ secrets.CSC_LINK }}
mac_certs_password: ${{ secrets.CSC_KEY_PASSWORD }}
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.snapcraft_token }}
- name: Upload to Gemfury
if: startsWith(matrix.os, 'ubuntu')
run: curl -F package=@$(find . -type f -name "*.deb") https://${{ secrets.gemfury_token }}@push.fury.io/lefterisgar/