Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Commit 26f61fc

Browse files
committed
feat(build): add automatic artifact commit
The build workflow now automatically commits the generated artifact to a separate branch for easier version tracking and release management. The commit message is "Add artifact".
1 parent 6e6d301 commit 26f61fc

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,17 @@ jobs:
110110
name: ${{ steps.artifact.outputs.filename }}
111111
path: ./build/distributions/content/*/*
112112

113+
# Commit the artifact to the repository on a separate branch
114+
- name: Commit artifact
115+
if: github.event_name == 'push'
116+
run: |
117+
git config --global user.name "GitHub Actions"
118+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
119+
git checkout -b artifact
120+
git add .
121+
git commit -m "Add artifact"
122+
git push origin artifact
123+
113124
# Prepare a draft release for GitHub Releases page for the manual verification
114125
# If accepted and published, release workflow would be triggered
115126
releaseDraft:

0 commit comments

Comments
 (0)