From 13f4ef7e22d644085af107efc6a666a1063ad1e5 Mon Sep 17 00:00:00 2001 From: Tlntin <371043382@qq.com> Date: Wed, 30 Nov 2022 17:09:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=89=E4=B8=AA=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E4=B8=8B=EF=BC=8C=E8=87=AA=E5=8A=A8=E6=89=93=E5=8C=85?= =?UTF-8?q?=E4=B8=8E=E4=B8=8A=E4=BC=A0release=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pake_build.yaml | 83 +++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 .github/workflows/pake_build.yaml diff --git a/.github/workflows/pake_build.yaml b/.github/workflows/pake_build.yaml new file mode 100644 index 0000000..685378d --- /dev/null +++ b/.github/workflows/pake_build.yaml @@ -0,0 +1,83 @@ +name: build +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - "v*" + +jobs: + build: + name: build + runs-on: ${{ matrix.os }} + strategy: + matrix: + build: [linux, windows, macos] + include: + - build: linux + os: ubuntu-latest + rust: nightly + target: x86_64-unknown-linux-musl + - build: windows + os: windows-latest + rust: nightly-x86_64-msvc + target: x86_64-pc-windows-msvc + - build: macos + os: macos-latest + rust: nightly + target: x86_64-apple-darwin + fail-fast: false + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: install node + uses: actions/setup-node@v1 + with: + node-version: 18 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + profile: minimal + override: true + target: ${{ matrix.target }} + + - name: install dependencies (ubuntu only) + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf + + - name: build for Ubuntu + if: matrix.os == 'ubuntu-latest' + run: npm run build:all-unix + + - name: build for MacOS + if: matrix.os == 'macos-latest' + run: npm run build:all-unix + + - name: build for windows + if: matrix.os == 'windows-latest' + run: | + npm run build:all-windows + + # - name: Create Release and Upload Release Asset + # uses: softprops/action-gh-release@v1 + # if: startsWith(github.ref, 'refs/tags/') + # with: + # tag_name: ${{ github.ref }} + # name: Release ${{ github.ref }} + # body: TODO New Release. + # draft: false + # prerelease: false + # files: | + # output/*/*.* + + - uses: ncipollo/release-action@v1 + if: startsWith(github.ref, 'refs/tags/v') + with: + allowUpdates: true + artifacts: "output/*/*.*" + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file