This commit is contained in:
@@ -34,8 +34,24 @@ jobs:
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
git config user.name "ci"
|
||||
git config user.email "ci@limelight"
|
||||
git checkout -B release
|
||||
git add -f dist/
|
||||
git commit -m "release: $(git log main -1 --pretty=%s)" || echo "nothing to commit"
|
||||
git config user.email "git@limelight.de"
|
||||
|
||||
# Save distributable files before switching branch
|
||||
mkdir -p /tmp/release
|
||||
cp package.json theme.css font.css /tmp/release/
|
||||
cp -r fonts assets /tmp/release/
|
||||
|
||||
# Create a clean orphan branch (no source files)
|
||||
git checkout --orphan release
|
||||
git rm -rf .
|
||||
|
||||
# Restore distributable files (dist/ survived as it was gitignored)
|
||||
cp /tmp/release/package.json .
|
||||
cp /tmp/release/theme.css .
|
||||
cp /tmp/release/font.css .
|
||||
cp -r /tmp/release/fonts .
|
||||
cp -r /tmp/release/assets .
|
||||
|
||||
git add package.json theme.css font.css dist/ fonts/ assets/
|
||||
git commit -m "release: $(git log origin/main -1 --pretty=%s)" || echo "nothing to commit"
|
||||
git push origin release --force
|
||||
|
||||
Reference in New Issue
Block a user