Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
HalcyonAlcedo authored Sep 2, 2024
1 parent 933731f commit 4a7a0da
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,23 @@ jobs:
- name: Build the project
run: npm run build

- name: Configure Git user information
- name: Stash lib folder before switching branch
run: |
git config user.name "GitHub Action"
git config user.email "action@github.com"
git add lib/ -f
git stash
- name: Checkout or create main branch and clear lib folder
- name: Checkout or create main branch
run: |
git fetch origin
git checkout main || git checkout -b main
git rm -rf lib/ || echo "No lib folder to remove"
git commit -m "Clear lib folder before merging dev changes" || echo "No changes to commit"
- name: Copy lib folder from dev to main
git stash pop
- name: Commit changes
run: |
git checkout dev -- lib/
git add -f lib/
git commit -m "Add lib folder from dev to main"
git commit -m "Update lib folder from dev branch"
- name: Push changes to main branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 4a7a0da

Please sign in to comment.