fix: actions

This commit is contained in:
msojocs 2022-01-30 19:55:34 +08:00
parent 4b427c2855
commit 4eec3fa256

View File

@ -9,7 +9,7 @@ on:
push:
tags:
- v*
branches: [ master ]
branches: [ master, actions ]
# pull_request:
# branches: [ master ]
# # Allows you to run this workflow manually from the Actions tab
@ -33,37 +33,32 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Build
- name: Prepare
run: |
pwd
ls -l
chmod 777 docker/entrypoint
chmod 777 tools/*
export ACTION_MODE=true
tools/setup-wechat-devtools-node
npm install nw-gyp -g
- name: Build
run: tools/setup-wechat-devtools-node
- name: Delete unused file
if: startsWith(github.ref, 'refs/tags/')
run: |
sudo rm -rf cache tmp
cd ../
mv wechat-devtools '${{ env.name }}'
mkdir -p wechat-devtools
mv '${{ env.name }}' wechat-devtools
mkdir ${{ env. name }}
find -maxdepth 1 -not -name ${{ env.name }} -not -name . -exec mv {} ${{ env.name }} \;
ls -l
env:
name: 'release-${{ github.ref_name }}'
- name: Release
uses: Wandalen/wretry.action@v1.0.11
uses: fnkr/github-action-ghr@v1
if: startsWith(github.ref, 'refs/tags/')
with:
action: fnkr/github-action-ghr@v1
with: |
node-version: 14.x
architecture: x64
attempt_limit: 3
attempt_delay: 2000
env:
GHR_COMPRESS: xz
GHR_PATH: /github/workspace
GHR_PATH: .
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}