Skip to content

Commit

Permalink
build: simplify build configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-alarcon committed Sep 19, 2023
1 parent be05f67 commit 878cebe
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Build/release
name: Build & Release

on: [push]

env:
GH_TOKEN: ${{ SECRETS.GITHUB_TOKEN }}

jobs:
release:
gitlab-release:
runs-on: ${{ matrix.os }}

# Platforms to build on/for
Expand Down Expand Up @@ -75,3 +75,33 @@ jobs:
github.ref == 'refs/heads/main' &&
startsWith(matrix.os, 'windows')
run: yarn dist:windows -- --publish always
snap-release:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x64, armv7l]
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}

steps:
- name: Check out Git repository
uses: actions/checkout@v3

- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v3
with:
node-version: 20

- name: Build
run: yarn --link-duplicates --pure-lockfile

- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v2

- name: Build for test only
if: github.ref != 'refs/heads/main'
run: yarn dist:linux:snap:${{ matrix.arch }} --publish never

- name: Release
if: github.ref == 'refs/heads/main'
run: yarn dist:linux:snap:${{ matrix.arch }} --publish always
40 changes: 0 additions & 40 deletions .github/workflows/snap.yml

This file was deleted.

12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "prospect-mail",
"productName": "Prospect Mail",
"version": "0.5.0-beta1",
"version": "0.5.0-beta2",
"main": "src/main.js",
"description": "Unofficial desktop client for Microsoft Outlook",
"homepage": "https://github.com/julian-alarcon/prospect-mail",
Expand Down Expand Up @@ -57,9 +57,9 @@
"dist:linux:targz": "electron-builder --x64 --arm64 --armv7l -l tar.gz",
"dist:mac": "electron-builder --mac",
"dist:windows": "electron-builder --windows --x64",
"dist:linux:x64": "electron-builder --x64 -l AppImage deb pacman rpm tar.gz",
"dist:linux:x64": "electron-builder --x64 -l AppImage deb pacman rpm snap tar.gz",
"dist:linux:arm64": "electron-builder --arm64 -l AppImage deb pacman rpm tar.gz",
"dist:linux:arm": "electron-builder --armv7l -l AppImage deb pacman rpm tar.gz",
"dist:linux:arm": "electron-builder --armv7l -l AppImage deb pacman rpm snap tar.gz",
"release": "electron-builder",
"postinstall": "electron-builder install-app-deps"
},
Expand Down Expand Up @@ -116,8 +116,10 @@
"upower-observe"
],
"publish": [
"github",
"snapStore"
{
"provider": "snapStore",
"channels": "beta"
}
],
"allowNativeWayland": true
},
Expand Down

0 comments on commit 878cebe

Please sign in to comment.