mirror of
https://github.com/msojocs/wechat-web-devtools-linux.git
synced 2025-07-07 00:02:14 +08:00
66 lines
1.7 KiB
YAML
66 lines
1.7 KiB
YAML
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
|
|
|
name: Node.js CI
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
push:
|
|
tags:
|
|
- v*
|
|
branches: [ master, actions ]
|
|
# pull_request:
|
|
# branches: [ master ]
|
|
# # Allows you to run this workflow manually from the Actions tab
|
|
# workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [16.x]
|
|
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: 'npm'
|
|
|
|
- name: Prepare
|
|
run: |
|
|
pwd
|
|
ls -l
|
|
chmod 777 docker/entrypoint
|
|
chmod 777 tools/*
|
|
export ACTION_MODE=true
|
|
npm install nw-gyp -g
|
|
|
|
- name: Build
|
|
run: tools/setup-wechat-devtools-node
|
|
|
|
- name: Delete unused file
|
|
run: |
|
|
sudo rm -rf cache tmp
|
|
mkdir ${{ env. name }}
|
|
find -maxdepth 1 -not -name ${{ env.name }} -not -name . -exec mv {} ${{ env.name }} \;
|
|
ls -l
|
|
cp -r "${{ env.name }}/package.nw/node_modules/nodegit" nodegit
|
|
env:
|
|
name: 'release-${{ github.ref_name }}'
|
|
|
|
- name: Release
|
|
uses: fnkr/github-action-ghr@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
env:
|
|
GHR_COMPRESS: xz
|
|
GHR_PATH: .
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|