Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
cars10 committed Jul 11, 2023
2 parents 816ef60 + 5fdc558 commit 93d7bec
Show file tree
Hide file tree
Showing 406 changed files with 13,787 additions and 25,788 deletions.
4 changes: 0 additions & 4 deletions .browserslistrc

This file was deleted.

29 changes: 26 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,32 @@
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*packj
*.njsproj
*.sln
*.sw?

# Tool logs
npm-debug.log
yarn-*.log

artifacts
browser_extension
# Tests
/test-results/
/playwright-report/
/playwright/.cache/
playwright/.auth
tests/*.png

artifacts/*
dist
node_modules
tests
browser_extension/*
!browser_extension/chrome/background.js
!browser_extension/chrome/manifest.json
!browser_extension/firefox/background.js
!browser_extension/firefox/manifest.json
tmp
src-tauri/target
9 changes: 0 additions & 9 deletions .editorconfig

This file was deleted.

4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

39 changes: 8 additions & 31 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,13 @@
module.exports = {
root: true,
env: {
node: true
},
plugins: [
'vuetify'
],
extends: [
'plugin:vue/essential',
'@vue/standard'
'plugin:vue/vue3-recommended',
'@vue/eslint-config-typescript',
],
parserOptions: {
parser: '@babel/eslint-parser'
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
indent: 'off',
'import/no-webpack-loader-syntax': 'off',
'vue/valid-v-slot': 'off',
'vue/multi-word-component-names': 'off',
'no-proto': 'off'
},
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)'
],
env: {
jest: true
}
}
]
'vue/max-attributes-per-line': 'off',
'vue/first-attribute-linebreak': 'off',
'vue/html-closing-bracket-newline': 'off',
'vue/singleline-html-element-content-newline': 'off',
'quotes': ['error', 'single']
}
}
212 changes: 75 additions & 137 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,79 +8,25 @@ on:
- 'v*'

jobs:
prepare-release:
name: Create github release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Create Github release draft
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
prerelease: true
draft: true
tag_name: ${{github.ref_name}}
release_name: ${{github.ref_name}}

- name: Save release-upload-url and release-id for later use
shell: bash
run: |
mkdir artifacts
echo "${{ steps.create_release.outputs.upload_url }}" > artifacts/release-upload-url
echo "${{ steps.create_release.outputs.id }}" > artifacts/release-id
- name: Get current package version
id: package-version
uses: martinbeentjes/[email protected]

- name: Save package version for later use
shell: bash
run: |
echo "${{ steps.package-version.outputs.current-version }}" > artifacts/package-version
- name: Upload release information
uses: actions/upload-artifact@v3
with:
name: artifacts
path: artifacts

build_desktop:
name: Build desktop app for ${{ matrix.platform }}
needs: prepare-release
strategy:
matrix:
platform: [ macos-latest, ubuntu-latest, windows-latest ]
#platform: [ ubuntu-latest ]
runs-on: ${{ matrix.platform }}

steps:
- name: download artifacts
uses: actions/download-artifact@v3
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
name: artifacts
path: artifacts

- name: Setup env
shell: bash
run: |
echo "RELEASE_UPLOAD_URL=$(cat artifacts/release-upload-url)" >> $GITHUB_ENV
echo "PACKAGE_VERSION=$(cat artifacts/package-version)" >> $GITHUB_ENV
cache: yarn
node-version: 18

- name: Checkout
uses: actions/checkout@v3

- name: setup node
uses: actions/setup-node@v3
with:
node-version: 16
- run: rustup toolchain install stable

- name: install rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: aarch64-apple-darwin
- run: rustup target add aarch64-apple-darwin
if: matrix.platform == 'macos-latest'

- name: (linux) install dependencies
if: matrix.platform == 'ubuntu-latest'
Expand All @@ -97,135 +43,127 @@ jobs:

- name: (mac arm) upload .dmg
if: matrix.platform == 'macos-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-artifact@v3
with:
upload_url: ${{ env.RELEASE_UPLOAD_URL }}
asset_path: src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/elasticvue_${{ env.PACKAGE_VERSION }}_aarch64.dmg
asset_name: elasticvue_${{ env.PACKAGE_VERSION }}_macos_aarch64.dmg
asset_content_type: application/octet-stream
path: src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/elasticvue_*_aarch64.dmg

- name: build app
run: yarn tauri build
- run: yarn tauri:build

- name: (mac) upload .dmg
if: matrix.platform == 'macos-latest'
uses: actions/upload-artifact@v3
with:
path: src-tauri/target/release/bundle/dmg/elasticvue_*_x64.dmg

- name: (linux) upload .deb
if: matrix.platform == 'ubuntu-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-artifact@v3
with:
upload_url: ${{ env.RELEASE_UPLOAD_URL }}
asset_path: src-tauri/target/release/bundle/deb/elasticvue_${{ env.PACKAGE_VERSION }}_amd64.deb
asset_name: elasticvue_${{ env.PACKAGE_VERSION }}_linux_amd64.deb
asset_content_type: application/octet-stream
path: src-tauri/target/release/bundle/deb/elasticvue_*_amd64.deb

- name: (linux) upload .appimage
if: matrix.platform == 'ubuntu-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-artifact@v3
with:
upload_url: ${{ env.RELEASE_UPLOAD_URL }}
asset_path: src-tauri/target/release/bundle/appimage/elasticvue_${{ env.PACKAGE_VERSION }}_amd64.AppImage
asset_name: elasticvue_${{ env.PACKAGE_VERSION }}_linux_amd64.AppImage
asset_content_type: application/octet-stream
path: src-tauri/target/release/bundle/appimage/elasticvue_*_amd64.AppImage

- name: (linux) upload binary
id: linux_upload_binary
if: matrix.platform == 'ubuntu-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.RELEASE_UPLOAD_URL }}
asset_path: src-tauri/target/release/elasticvue
asset_name: elasticvue_${{ env.PACKAGE_VERSION }}_linux_amd64
asset_content_type: application/octet-stream

- name: (mac) upload .dmg
if: matrix.platform == 'macos-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-artifact@v3
with:
upload_url: ${{ env.RELEASE_UPLOAD_URL }}
asset_path: src-tauri/target/release/bundle/dmg/elasticvue_${{ env.PACKAGE_VERSION }}_x64.dmg
asset_name: elasticvue_${{ env.PACKAGE_VERSION }}_macos_x64.dmg
asset_content_type: application/octet-stream
path: src-tauri/target/release/elasticvue

- name: (windows) upload .msi
if: matrix.platform == 'windows-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-artifact@v3
with:
upload_url: ${{ env.RELEASE_UPLOAD_URL }}
asset_path: src-tauri/target/release/bundle/msi/elasticvue_${{ env.PACKAGE_VERSION }}_x64_en-US.msi
asset_name: elasticvue_${{ env.PACKAGE_VERSION }}_windows_x64_en-US.msi
asset_content_type: application/octet-stream
path: src-tauri/target/release/bundle/msi/elasticvue_*_x64_en-US.msi

- name: (windows) upload .exe
if: matrix.platform == 'windows-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-artifact@v3
with:
upload_url: ${{ env.RELEASE_UPLOAD_URL }}
asset_path: src-tauri/target/release/elasticvue.exe
asset_name: elasticvue_${{ env.PACKAGE_VERSION }}_windows_x64.exe
asset_content_type: application/octet-stream
path: src-tauri/target/release/elasticvue.exe

build_docker:
build_browser_extensions:
name: Build browser extensions
runs-on: ubuntu-latest
environment: production
steps:
- name: Set release version env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- uses: actions/checkout@v3
- run: make build_browser_extensions

- name: upload chrome extension
uses: actions/upload-artifact@v3
with:
path: artifacts/*.zip

build_docker:
name: Build docker images
runs-on: ubuntu-latest
steps:
- name: Docker hub login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker buildx
uses: docker/setup-buildx-action@v2

- uses: martinbeentjes/[email protected]
id: package-version

- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
file: Dockerfile_multiarch
file: docker/Dockerfile_multiarch
push: true
tags: cars10/elasticvue:latest,cars10/elasticvue:${{ env.RELEASE_VERSION }}
#tags: cars10/elasticvue:latest,cars10/elasticvue:${{ steps.package-version.outputs.current-version }}
tags: cars10/elasticvue:${{ steps.package-version.outputs.current-version }}

publish:
name: Publish github release
name: Publish release
needs:
- build_desktop
- build_browser_extensions
- build_docker
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v1
with:
name: artifacts
path: artifacts
- uses: actions/checkout@v3
- uses: martinbeentjes/[email protected]
id: package-version

- name: Save release id in ENV
shell: bash
run: |
echo "RELEASE_ID=$(cat artifacts/release-id)" >> $GITHUB_ENV
- uses: actions/download-artifact@v3
with:
path: github-artifacts

- uses: eregon/publish-release@v1
- uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ env.RELEASE_ID }}
draft: true
prerelease: true
tag: ${{ github.ref_name }}
name: ${{ github.ref_name }}
artifacts: github-artifacts/artifact/*
body: |
## Using elasticvue
### Desktop app
* [Linux .AppImage](https://github.com/cars10/elasticvue-test/releases/download/${{ github.ref_name }}/elasticvue_${{ steps.package-version.outputs.current-version }}_amd64.AppImage)
* [Mac x68 .dmg](https://github.com/cars10/elasticvue-test/releases/download/${{ github.ref_name }}/elasticvue_${{ steps.package-version.outputs.current-version }}_x64.dmg) / [Mac aarch64 .dmg](https://github.com/cars10/elasticvue-test/releases/download/${{ github.ref_name }}/elasticvue_${{ steps.package-version.outputs.current-version }}_aarch64.dmg)
* [Windows .msi](https://github.com/cars10/elasticvue-test/releases/download/${{ github.ref_name }}/elasticvue_${{ steps.package-version.outputs.current-version }}_x64_en-US.msi)
### Browser extension
* [Google Chrome](https://chrome.google.com/webstore/detail/elasticvue/hkedbapjpblbodpgbajblpnlpenaebaa)
* [Mozilla Firefox](https://addons.mozilla.org/en-US/firefox/addon/elasticvue/)
* [Microsoft Edge](https://microsoftedge.microsoft.com/addons/detail/elasticvue/geifniocjfnfilcbeloeidajlfmhdlgo)
### Other
* [Docker](https://hub.docker.com/r/cars10/elasticvue)
* [Hosted](https://app.elasticvue.com)
Loading

0 comments on commit 93d7bec

Please sign in to comment.