Skip to content

Commit

Permalink
fix(ci): add cli build action and modify web action
Browse files Browse the repository at this point in the history
  • Loading branch information
Swilder-M committed Jul 29, 2022
1 parent ce9858b commit 9e019b0
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/build_cli.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: build cli

on:
pull_request:
release:
types:
- published

jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16.14
- name: build
run: |
cd cli
yarn && yarn build
npm install -g pkg
pkg package.json
- uses: actions/upload-artifact@v2
with:
name: cli
path: cli/release
- name: upload release asset
if: github.event_name == 'release'
run: |
cd cli/release
for var in $(ls); do
$GITHUB_WORKSPACE/.github/workflows/upload_github_release_asset.sh \
owner=${{ github.repository_owner }} \
repo=mqttx \
tag=$(echo ${{ github.ref }} | sed -r "s ^refs/heads/|^refs/tags/(.*) \1 g") \
filename=$var \
github_api_token=$(echo ${{ secrets.GITHUB_TOKEN }})
done
1 change: 0 additions & 1 deletion .github/workflows/build_packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ jobs:
filename=$var \
github_api_token=$(echo ${{ secrets.GITHUB_TOKEN }})
done
2 changes: 2 additions & 0 deletions .github/workflows/deploy_web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
release:
types:
- published
pull_request:
workflow_dispatch:

jobs:
Expand All @@ -25,6 +26,7 @@ jobs:
cd web
yarn && yarn build
- name: upload dist
if: github.event_name != 'pull_request'
run: |
cd web
wget http://gosspublic.alicdn.com/ossutil/1.7.8/ossutil64
Expand Down

0 comments on commit 9e019b0

Please sign in to comment.