Skip to content

Commit

Permalink
Refactor cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
hiento09 committed Oct 19, 2023
1 parent a9654ac commit 8ece70b
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 78 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/jan-docs-test.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
name: Deploy to GitHub Pages
name: Jan Docs

on:
push:
branches:
- main
paths:
- 'docs/**'
- '.github/workflows/deploy-jan-docs.yml'
- '.github/workflows/jan-docs.yml'
pull_request:
branches:
- main
paths:
- 'docs/**'
- '.github/workflows/jan-docs.yml'
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

Expand All @@ -30,11 +36,13 @@ jobs:
working-directory: docs

- name: Add Custome Domain file
if: github.event_name == 'push' && github.event.pull_request.head.repo.full_name != github.repository
run: echo "${{ vars.DOCUSAURUS_DOMAIN }}" > ./docs/build/CNAME

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.event.pull_request.head.repo.full_name != github.repository
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Jan Build MacOS App
name: Jan Build Electron App

on:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Linter & Test
name: Jan Electron Linter & Test
on:
push:
branches:
- main
paths:
- 'electron/**'
- .github/workflows/linter-and-test.yml
- .github/workflows/jan-electron-linter-and-test.yml
- 'web/**'
- 'package.json'
- 'node_modules/**'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
name: Publish plugin core Package to npmjs
name: Plugin Core
on:
push:
branches:
- main
paths:
- "core/**"
- ".github/workflows/publish-core.yml"
- ".github/workflows/jan-plugin-core.yml"
- "!core/package.json"
pull_request:
branches:
- main
paths:
- "core/**"
- ".github/workflows/jan-plugin-core.yml"
- "!core/package.json"
jobs:
build-and-publish-plugins:
Expand Down Expand Up @@ -50,11 +57,13 @@ jobs:
- run: npm install && npm run build
working-directory: ./core
- run: npm publish --access public
if: github.event_name == 'push' && github.event.pull_request.head.repo.full_name != github.repository
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
working-directory: ./core

- name: "Commit new version to main and create tag"
if: github.event_name == 'push' && github.event.pull_request.head.repo.full_name != github.repository
run: |
version=$(jq -r '.version' core/package.json)
git config --global user.email "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
name: Publish plugins/$dir Package to npmjs
name: Jan Default Plugins
on:
push:
branches:
- main
paths:
- "plugins/**"
- ".github/workflows/publish-plugins.yml"
- ".github/workflows/jan-plugins.yml"
- "!plugins/*/package.json"
pull_request:
branches:
- main
paths:
- "plugins/**"
- ".github/workflows/jan-plugins.yml"
- "!plugins/*/package.json"
jobs:
build:
Expand Down Expand Up @@ -69,13 +76,16 @@ jobs:
echo $dir
cd $dir
npm install && npm run build
npm publish --access public
if [[ $GITHUB_EVENT_NAME == 'push' && $GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME != $GITHUB_REPOSITORY ]]; then
npm publish --access public
fi
cd ..
done
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: "Commit new version to main and create tag"
if: github.event_name == 'push' && github.event.pull_request.head.repo.full_name != github.repository
run: |
for dir in $(cat /tmp/change_dir.txt)
do
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/quality-gate.yml

This file was deleted.

0 comments on commit 8ece70b

Please sign in to comment.