mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-04 05:48:11 +08:00
Add self-hosted build asset deployment to GitHub releases in the CI action
This commit is contained in:
@@ -12,7 +12,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: write
|
||||||
deployments: write
|
deployments: write
|
||||||
env:
|
env:
|
||||||
RUSTC_WRAPPER: /usr/bin/sccache
|
RUSTC_WRAPPER: /usr/bin/sccache
|
||||||
@@ -66,3 +66,14 @@ jobs:
|
|||||||
projectName: graphite-editor
|
projectName: graphite-editor
|
||||||
directory: frontend/dist
|
directory: frontend/dist
|
||||||
branch: master
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user