Skip to content

Commit

Permalink
Merge branch 'development' into pslab-fossasia#533
Browse files Browse the repository at this point in the history
  • Loading branch information
shivanandaalva authored Oct 26, 2023
2 parents 906bc6f + 669f850 commit 98f2dd3
Show file tree
Hide file tree
Showing 64 changed files with 79,858 additions and 1,336 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build/release

on: push

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

strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]

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

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

- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ github.token }}

# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
args: '-c.extraMetadata.main=build/electron.js'
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ __pycache__
PSL_Apps.egg-info
build
ui_*.py

/venv

#-------------------- Electron -----------------------------
.DS_Store
Expand Down Expand Up @@ -32,7 +32,6 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
/.idea
package-lock.json
yarn.lock
.vscode/

Expand Down
12 changes: 12 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
"stories": [
"../src/**/*.stories.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)"
],
"addons": [
"@storybook/addon-links",
"@storybook/addon-actions",
"@storybook/addon-essentials",
"@storybook/preset-create-react-app"
]
}
4 changes: 4 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
}
37 changes: 30 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,45 @@ matrix:
include:
- name: "linux"
os: linux
script: npm run build-linux
script:
- sudo apt-get install rpm -y
- npm run build-linux
- ls -al dist/
- name: "windows"
os: linux
services: docker
script: docker run --rm -e GH_TOKEN=$GITHUB_API_KEY -v $PWD:/project -v ~/.cache/electron:/root/.cache/electron -v ~/.cache/electron-builder:/root/.cache/electron-builder electronuserland/builder:wine /bin/bash -c "npm run build-windows"
script:
- >
docker run --rm -e GH_TOKEN=$GITHUB_TOKEN
-v $PWD:/project
-v ~/.cache/electron:/root/.cache/electron
-v ~/.cache/electron-builder:/root/.cache/electron-builder
electronuserland/builder:wine /bin/bash -c "npm run build-windows"
- ls -al dist/

cache:
npm: false

before_script:
- export CI=false

#deploy:
# provider: script
# skip_cleanup: true
# script: bash travis-scripts/upload-packages.sh
# on:
script:
- npm run lint
- npm run fmt:check

deploy:
provider: releases
api_key: "$GITHUB_TOKEN"
# see .build.*.target in package.json
# TODO: Be more specific? Files are named e.g. dist/pslab_2.1.0_amd64.deb
file:
- "dist/*.deb"
- "dist/*.rpm"
- "dist/*.tar.xz"
- "dist/*.exe"
skip_cleanup: true
draft: true # TODO: remove when it works
on:
tags: true
# all_branches: true
# condition: $TRAVIS_BRANCH =~ ^(master|development)$
Loading

0 comments on commit 98f2dd3

Please sign in to comment.