Build and publish #45
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 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/ |