Skip to content

fix: CI publish snap #48

fix: CI publish snap

fix: CI publish snap #48

Workflow file for this run

name: Build and publish
on:
push:
tags:
- '*'
jobs:
tests:
uses: ./.github/workflows/tests.yml
build:
needs: [tests]
runs-on: ${{ matrix.os }}
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
uses: samuelmeuli/action-snapcraft@v1
if: startsWith(matrix.os, 'ubuntu')
- name: Build & publish Caprine
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 }}
- name: Cleanup tag
uses: mad9000/actions-find-and-replace-string@5
id: release_tag
with:
source: ${{ github.ref_name }}
find: v
replace: ''
- name: Upload to Snapcraft
if: startsWith(matrix.os, 'ubuntu')
uses: snapcore/action-publish@v1
with:
snap: dist/caprine_${{ steps.release_tag.outputs.value }}_amd64.snap
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/