From db0c546785eb395957c2278cc274cc76acb2163a Mon Sep 17 00:00:00 2001 From: Morgan Date: Mon, 19 May 2025 11:32:48 +0900 Subject: [PATCH] Create build.yml --- .github/workflows/build.yml | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..360a867 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,46 @@ +name: Build + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.*' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install jq + run: | + apt update + apt install -y jq + + - name: Add AppImage + run: | + cp package.json package.json.orig + cat package.json.orig | jq '.build.linux.target = ["AppImage", "tar.gz"]' > package.json + + - name: Read .nvmrc + run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) + id: nvm + + - name: Use Node.js ${{ steps.nvm.outputs.NODE_VERSION }} + uses: actions/setup-node@v2 + with: + node-version: ${{ steps.nvm.outputs.NODE_VERSION }} + + - name: Build + run: | + npm install pnpm + pnpm build --platform linux + + - name: Upload Build Artifacts + uses: actions/upload-artifact@v3 + with: + name: linux-build + path: | + release/*.AppImage + release/*.tar.gz +