From 6b170f3116ed21132054a2f73bd6bc1e69dd0242 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Tue, 9 Mar 2021 22:50:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E8=BF=81=E7=A7=BB=E5=88=B0Gi?= =?UTF-8?q?tHub=20Actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .appveyor.yml | 21 -------------- .github/workflow/release.yml | 54 ++++++++++++++++++++++++++++++++++++ .travis.yml | 49 -------------------------------- 3 files changed, 54 insertions(+), 70 deletions(-) delete mode 100644 .appveyor.yml create mode 100644 .github/workflow/release.yml delete mode 100644 .travis.yml diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index b934f52f..00000000 --- a/.appveyor.yml +++ /dev/null @@ -1,21 +0,0 @@ -platform: - - x64 - -cache: - - node_modules - - '%APPDATA%\npm-cache' - - '%LOCALAPPDATA%\electron\Cache' - - '%LOCALAPPDATA%\electron-builder\Cache' - -install: - - ps: Install-Product node 12 x64 - - npm install - -build_script: - - npm run publish:gh - -test: off - -branches: - only: - - master diff --git a/.github/workflow/release.yml b/.github/workflow/release.yml new file mode 100644 index 00000000..49b5595a --- /dev/null +++ b/.github/workflow/release.yml @@ -0,0 +1,54 @@ +name: Build/release + +on: + push: + branches: + - master + +jobs: + Windows: + name: Windows + runs-on: windows-latest + steps: + - name: Check out git repository + uses: actions/checkout@v2 + - name: Install Node.js + uses: actions/setup-node@v2 + with: + node-version: '12' + + - run: npm run publish:gh + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + Mac: + name: Mac + runs-on: macos-latest + steps: + - name: Check out git repository + uses: actions/checkout@v2 + - name: Install Node.js + uses: actions/setup-node@v2 + with: + node-version: '12' + - run: npm run publish:gh:mac + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + Linux: + name: Linux + runs-on: ubuntu-latest + steps: + - name: Install package + - run: sudo apt-get install -y rpm bsdtar + + - name: Check out git repository + uses: actions/checkout@v2 + + - name: Install Node.js + uses: actions/setup-node@v2 + with: + node-version: '12' + - run: npm run publish:gh:linux + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7284625e..00000000 --- a/.travis.yml +++ /dev/null @@ -1,49 +0,0 @@ -language: node_js -node_js: 12 - -matrix: - include: - - os: osx - osx_image: xcode10.2 - env: - - ELECTRON_CACHE=$HOME/.cache/electron - - ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder - - - os: linux - dist: trusty - sudo: required - addons: - apt: - packages: - - rpm - - bsdtar - -cache: - directories: - - node_modules - - $HOME/.cache/electron - - $HOME/.cache/electron-builder - - $HOME/.npm/_prebuilds - -notifications: - email: false - -script: - - node --version - - npm --version - - | - if [ "$TRAVIS_OS_NAME" == "linux" ]; then - npm install && npm run publish:gh:linux - else - npm run publish:gh:mac - fi - -before_cache: - - rm -rf $HOME/.cache/electron-builder/wine - -# only run this script on pull requests and merges into -# the 'master' and 'prod' branches -branches: - only: - - master - - dev