From e5215a586f57007dac345ebd8deffce9597d496b Mon Sep 17 00:00:00 2001 From: Keavon Chambers Date: Mon, 26 Aug 2024 23:57:39 -0700 Subject: [PATCH] Add self-hosted build asset deployment to GitHub releases in the CI action --- .github/workflows/production-build.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/production-build.yml b/.github/workflows/production-build.yml index fe286ff40a..35894581a7 100644 --- a/.github/workflows/production-build.yml +++ b/.github/workflows/production-build.yml @@ -12,7 +12,7 @@ jobs: build: runs-on: self-hosted permissions: - contents: read + contents: write deployments: write env: RUSTC_WRAPPER: /usr/bin/sccache @@ -66,3 +66,13 @@ jobs: projectName: graphite-editor directory: frontend/dist branch: master + + - name: 📦 Upload assets to GitHub release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + DATE=$(date +%F) + cd frontend + mv dist "graphite-$DATE" + zip -r "graphite-self-hosted-build.zip" "graphite-$DATE" + gh release upload latest-stable "graphite-self-hosted-build.zip" --clobber