Skip to content

Commit

Permalink
Merge pull request #39 from PromptMixerDev/fix-deploy
Browse files Browse the repository at this point in the history
Fix deploy
  • Loading branch information
prompt-mixer authored Nov 14, 2024
2 parents 2add15b + 8caf941 commit 8560ed7
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 43 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ on:

jobs:
build-and-test:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
node-version: ['21']
node-version: ['22']

steps:
- name: 🔄 Check out repository
Expand All @@ -25,17 +24,14 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: 🔑 Setup GH_TOKEN
run: echo "GH_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV

- name: 🧱 Install dependencies
run: yarn install

- name: 📦 Build Electron app
run: yarn build:e2e
env:
REACT_APP_FIREBASE_API_KEY: ${{ secrets.REACT_APP_FIREBASE_API_KEY }}
REACT_APP_FIREBASE_AUTH_DOMAIN: ${{ secrets.REACT_APP_FIREBASE_AUTH_DOMAIN }}
REACT_APP_FIREBASE_PROJECT_ID: ${{ secrets.REACT_APP_FIREBASE_PROJECT_ID }}
REACT_APP_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.REACT_APP_FIREBASE_MESSAGING_SENDER_ID }}
REACT_APP_FIREBASE_APP_ID: ${{ secrets.REACT_APP_FIREBASE_APP_ID }}
run: yarn build:linux

- name: 🧪 Run E2E tests
run: yarn test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/public-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
- name: Upload assets to the release
env:
ACCESS_TOKEN: ${{ secrets.GH_TOKEN }}
SOURCE_REPO: 'PromptMixerDev/prompt-mixer-app'
SOURCE_REPO: 'PromptMixerDev/prompt-mixer-app-ce'
TARGET_REPO: 'PromptMixerDev/prompt-mixer-releases'
TAG_NAME: ${{ steps.get_tag.outputs.TAG_NAME }}
run: |
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/release-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,12 @@ jobs:

env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
REACT_APP_FIREBASE_API_KEY: ${{ secrets.REACT_APP_FIREBASE_API_KEY }}
REACT_APP_FIREBASE_AUTH_DOMAIN: ${{ secrets.REACT_APP_FIREBASE_AUTH_DOMAIN }}
REACT_APP_FIREBASE_PROJECT_ID: ${{ secrets.REACT_APP_FIREBASE_PROJECT_ID }}
REACT_APP_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.REACT_APP_FIREBASE_MESSAGING_SENDER_ID }}
REACT_APP_FIREBASE_APP_ID: ${{ secrets.REACT_APP_FIREBASE_APP_ID }}
REACT_APP_MONTHLY_SUBSCRIPTION_PRICE_ID: ${{ secrets.REACT_APP_MONTHLY_SUBSCRIPTION_PRICE_ID }}
REACT_APP_YEARLY_SUBSCRIPTION_PRICE_ID: ${{ secrets.REACT_APP_YEARLY_SUBSCRIPTION_PRICE_ID }}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '21.x'
node-version: '22.x'

- name: Install dependencies
run: |
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/release-mac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,13 @@ jobs:
APPLEIDPASS: ${{secrets.APPLEIDPASS}}
ASCPROVIDER: ${{secrets.ASCPROVIDER}}
CSC_KEY_PASSWORD: ${{secrets.MACOS_CERT_PASSWORD}}
REACT_APP_FIREBASE_API_KEY: ${{ secrets.REACT_APP_FIREBASE_API_KEY }}
REACT_APP_FIREBASE_AUTH_DOMAIN: ${{ secrets.REACT_APP_FIREBASE_AUTH_DOMAIN }}
REACT_APP_FIREBASE_PROJECT_ID: ${{ secrets.REACT_APP_FIREBASE_PROJECT_ID }}
REACT_APP_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.REACT_APP_FIREBASE_MESSAGING_SENDER_ID }}
REACT_APP_FIREBASE_APP_ID: ${{ secrets.REACT_APP_FIREBASE_APP_ID }}
REACT_APP_MONTHLY_SUBSCRIPTION_PRICE_ID: ${{ secrets.REACT_APP_MONTHLY_SUBSCRIPTION_PRICE_ID }}
REACT_APP_YEARLY_SUBSCRIPTION_PRICE_ID: ${{ secrets.REACT_APP_YEARLY_SUBSCRIPTION_PRICE_ID }}
USE_HARD_LINKS: false

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "21.x"
node-version: "22.x"
- name: Decode and Import Certificate
run: |
echo "${{ secrets.MAC_CERTIFICATE }}" | base64 --decode > ./certificate.p12
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/release-win.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ jobs:
version: ${{ steps.set_output.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
REACT_APP_FIREBASE_API_KEY: ${{ secrets.REACT_APP_FIREBASE_API_KEY }}
REACT_APP_FIREBASE_AUTH_DOMAIN: ${{ secrets.REACT_APP_FIREBASE_AUTH_DOMAIN }}
REACT_APP_FIREBASE_PROJECT_ID: ${{ secrets.REACT_APP_FIREBASE_PROJECT_ID }}
REACT_APP_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.REACT_APP_FIREBASE_MESSAGING_SENDER_ID }}
REACT_APP_FIREBASE_APP_ID: ${{ secrets.REACT_APP_FIREBASE_APP_ID }}
REACT_APP_MONTHLY_SUBSCRIPTION_PRICE_ID: ${{ secrets.REACT_APP_MONTHLY_SUBSCRIPTION_PRICE_ID }}
REACT_APP_YEARLY_SUBSCRIPTION_PRICE_ID: ${{ secrets.REACT_APP_YEARLY_SUBSCRIPTION_PRICE_ID }}
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -137,4 +130,4 @@ jobs:
- name: Clean up artifacts
if: always()
run: |
rm -rf ${{ github.workspace }}/dist
rm -rf ${{ github.workspace }}/dist
4 changes: 4 additions & 0 deletions builder-configs/electron-builder.linux.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ const commonConfig = require('./electron-builder.common.cjs');

const config = {
...commonConfig,
productName: 'promptmixer',
executableName: 'promptmixer',
linux: {
executableName: 'promptmixer',
artifactName: 'promptmixer-${version}.${ext}',
target: [
{
target: 'AppImage',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "promptmixer-app",
"productName": "PromptMixer",
"version": "0.2.6",
"version": "0.2.7",
"repository": {
"type": "git",
"url": "https://github.com/PromptMixerDev/prompt-mixer-releases"
Expand Down
17 changes: 10 additions & 7 deletions tests/wdio.conf.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable @typescript-eslint/consistent-type-assertions */
import type { Options } from '@wdio/types';
import { hooks } from './src/support/hooks.js';
import * as path from 'path';

process.env.TEST = 'true';

Expand Down Expand Up @@ -65,13 +66,15 @@ export const config: Options.Testrunner = {
capabilities: [
{
browserName: 'electron',
// Electron service options
// see https://webdriver.io/docs/wdio-electron-service/#configuration
// 'wdio:electronServiceOptions': {
// appBinaryPath: appPath,
// // custom application args
// appArgs: []
// }
'wdio:electronServiceOptions': {
appBinaryPath: path.join(process.cwd(), 'dist',
process.platform === 'win32'
? 'win-unpacked/PromptMixer.exe'
: process.platform === 'darwin'
? 'mac-arm64/PromptMixer.app/Contents/MacOS/PromptMixer'
: 'linux-unpacked/promptmixer'
)
}
},
],

Expand Down

0 comments on commit 8560ed7

Please sign in to comment.