From a0aa48d1f5a9faadbcc504ce2a582476d10c3597 Mon Sep 17 00:00:00 2001 From: Adil Hanney Date: Thu, 3 Aug 2023 21:50:50 +0100 Subject: [PATCH] Add GitHub workflow to build update --- .github/workflows/update.yaml | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/update.yaml diff --git a/.github/workflows/update.yaml b/.github/workflows/update.yaml new file mode 100644 index 0000000..2fd85cc --- /dev/null +++ b/.github/workflows/update.yaml @@ -0,0 +1,45 @@ +name: Update loffice-365 + +on: + workflow_dispatch: + push: + tags: + - '**' + +jobs: + update: + name: Update loffice-365 + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: "18" + cache: "npm" + + - name: Install dependencies + run: | + npm install + + NATIVEFIER_VERSION=$(npm view nativefier version) + echo "NATIVEFIER_VERSION=$NATIVEFIER_VERSION" >> $GITHUB_ENV + + - name: Build + run: | + npm run build + + - name: Upload binaries/loffice-365.tgz + uses: actions/upload-artifact@v2 + with: + name: loffice-365.tgz + path: binaries/loffice-365.tgz + + - name: Upload to GitHub release + uses: svenstaro/upload-release-action@v2 + if: ${{ startsWith(github.ref, 'refs/tags/') }} + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: output/${{ steps.rename_apk.outputs.apkName }}