Skip to content

fix: lock quasar version #78

fix: lock quasar version

fix: lock quasar version #78

Workflow file for this run

name: Build Release
on:
push:
tags:
- 'v**'
permissions: write-all
jobs:
build-and-deploy:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- os: ubuntu-latest
deploy_dir: /
artifact_name: pic_online.zip
asset_name: pic_online.zip
release_name: pic_online
- os: ubuntu-latest
deploy_dir: /pic
artifact_name: pic_online_pic.zip
asset_name: pic_online_pic.zip
release_name: pic_online_pic
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Setup Node.js & Cache Dependencies ⚡️
uses: actions/setup-node@v3
with:
node-version: 16
# 不缓存 node modules, 没啥提升, 时间还长了
# cache: 'npm'
# cache-dependency-path: lock.json
#See:// https://github.com/actions/virtual-environments/blob/ubuntu18/20201004.1/images/linux/Ubuntu1804-README.md
# - name: Install build dependencies
# run: |
# sudo apt-get update
# sudo apt-get install -y zip git
- name: Set Environment 🔨
run: |
sudo npm install -g @quasar/cli
- name: Install dependencies 🔧
run: |
npm install
set -x
ls node_modules/vue-waterfall-plugin-next
ls node_modules/vue-waterfall-plugin-next/dist/style.css
cat node_modules/vue-waterfall-plugin-next/package.json
set +x
- name: Package Artifact 🎁
run: |
export PIC_DEPLOY_DIR=${{ matrix.deploy_dir }}
npm run build
zip -r ${{ matrix.artifact_name }} dist/spa/*
ls -alh *.zip
- name: Upload Artifact 🚀
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.asset_name }}
path: ${{ matrix.artifact_name }}
- name: Upload binaries to release ☕
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}
overwrite: true
body: "部署说明: \n
* `pic_online.zip`: 必须放在网站 `根目录` 下, 不能放在子目录下 \n
* `pic_online_pic.zip`: 必须放在网站子目录 `/pic` 下"
# https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#create-a-repository-dispatch-event
- name: Triggr Docker Build
run: |
curl -L -X POST -H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/IITII/pic_online_backend/dispatches \
-d '{"event_type":"webhook","client_payload":{"unit":false,"integration":true}}'