mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-14 16:02:34 +08:00
* Add support to x vversion from npm * Add support to x vversion from npm * Add support to x vversion from npm * Add docs builder
53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
|
|
# This file was contributed by Carlos Parada and Yamel Senih from ERP Consultores y Asociados, C.A
|
|
|
|
name: Publish Project
|
|
|
|
on:
|
|
release:
|
|
types: [created]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [10.x, 12.x, 13.x, 14.x]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- run: npm i
|
|
- run: npm test
|
|
- run: npm run build:prod --if-present
|
|
- run: set -e
|
|
- run: |
|
|
cd docs
|
|
npm i
|
|
npm run build
|
|
|
|
publish-dist:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 12
|
|
registry-url: https://registry.npmjs.org/
|
|
- run: npm i
|
|
- run: sed -i "s|releaseNoForDocumentation|${{ github.event.release.tag_name }}|g" config/default.json
|
|
- run: npm run build:prod --if-present
|
|
- uses: TheDoctor0/zip-release@0.4.1
|
|
with:
|
|
filename: 'Adempiere-Vue.zip'
|
|
path: 'dist/'
|
|
- uses: skx/github-action-publish-binaries@master
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.TOKEN_ACCESS }}
|
|
with:
|
|
args: 'Adempiere-Vue.zip'
|