Skip to content

Commit

Permalink
Add self-hosted build asset deployment to GitHub releases in the CI a…
Browse files Browse the repository at this point in the history
…ction
  • Loading branch information
Keavon committed Aug 27, 2024
1 parent 78337f9 commit f2493d5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/production-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
runs-on: self-hosted
permissions:
contents: read
contents: write
deployments: write
env:
RUSTC_WRAPPER: /usr/bin/sccache
Expand Down Expand Up @@ -66,3 +66,14 @@ jobs:
projectName: graphite-editor
directory: frontend/dist
branch: master

- name: 📦 Upload assets to GitHub release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
DATE=$(git log -1 --format=%cd --date=format:%Y-%m-%d)
cd frontend
sed -i "s|$INDEX_HTML_HEAD_REPLACEMENT||" dist/index.html
mv dist "graphite-$DATE"
zip -r "graphite-self-hosted-build.zip" "graphite-$DATE"
gh release upload latest-stable "graphite-self-hosted-build.zip" --clobber

0 comments on commit f2493d5

Please sign in to comment.