From 50d7707856244b16813e591dfe0532bef3dddece Mon Sep 17 00:00:00 2001 From: Julian Alarcon Date: Tue, 19 Sep 2023 11:54:57 +0200 Subject: [PATCH] build: simplify build configuration --- .../{release.yml => build-release.yml} | 34 +++++++++++++++- .github/workflows/snap.yml | 40 ------------------- README.md | 4 +- package.json | 12 +++--- 4 files changed, 41 insertions(+), 49 deletions(-) rename .github/workflows/{release.yml => build-release.yml} (71%) delete mode 100644 .github/workflows/snap.yml diff --git a/.github/workflows/release.yml b/.github/workflows/build-release.yml similarity index 71% rename from .github/workflows/release.yml rename to .github/workflows/build-release.yml index 07a531c..3facae0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/build-release.yml @@ -1,4 +1,4 @@ -name: Build/release +name: Build & Release on: [push] @@ -6,7 +6,7 @@ env: GH_TOKEN: ${{ SECRETS.GITHUB_TOKEN }} jobs: - release: + github-release: runs-on: ${{ matrix.os }} # Platforms to build on/for @@ -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 diff --git a/.github/workflows/snap.yml b/.github/workflows/snap.yml deleted file mode 100644 index 122406d..0000000 --- a/.github/workflows/snap.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Build/release for Snap - -on: push - -defaults: - run: - shell: bash - -jobs: - snap: - runs-on: ubuntu-latest - strategy: - matrix: - arch: [x64, armv7l] - env: - SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }} - GH_TOKEN: ${{ SECRETS.GITHUB_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 diff --git a/README.md b/README.md index 992b10c..ffb3de1 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ logo -[![builds](https://github.com/julian-alarcon/prospect-mail/actions/workflows/release.yml/badge.svg)](https://github.com/julian-alarcon/prospect-mail/actions) -[![releases](https://badgen.net/github/release/julian-alarcon/prospect-mail/)](https://github.com/julian-alarcon/prospect-mail/releases/latest) +[![Build & Release](https://github.com/julian-alarcon/prospect-mail/actions/workflows/build-release.yml/badge.svg)](https://github.com/julian-alarcon/prospect-mail/actions/workflows/build-release.yml) +[![releases](https://badgen.net/github/release/julian-alarcon/prospect-mail)](https://github.com/julian-alarcon/prospect-mail/releases/latest) The Outlook desktop client for the [new Outlook Interface](https://www.microsoft.com/en-us/microsoft-365/blog/2018/06/13/power-and-simplicity-updates-to-the-office-365-user-experience/) diff --git a/package.json b/package.json index 2451c25..912ecdb 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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" }, @@ -116,8 +116,10 @@ "upower-observe" ], "publish": [ - "github", - "snapStore" + { + "provider": "snapStore", + "channels": "beta" + } ], "allowNativeWayland": true },