Skip to content

Commit 3d86597

Browse files
authored
fix: Updates release and dist-pr. (#215)
1 parent 848eb2d commit 3d86597

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

.github/workflows/dist-pr.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,25 @@ jobs:
2727
uses: actions/checkout@v3
2828
with:
2929
token: ${{ secrets.GH_MERGE_TOKEN }}
30-
fetch-depth: 0
30+
fetch-depth: 0 # Fetch all history
3131

3232
- name: Set Git Identity
3333
run: |
3434
git config --global user.name 'googlemaps-bot'
3535
git config --global user.email '[email protected]'
3636
37+
- name: Create Branch for PR
38+
run: |
39+
git fetch origin main
40+
git checkout -b dist-to-main-pr origin/dist
41+
3742
- name: Create Pull Request
3843
run: |
3944
gh pr create \
4045
--base main \
41-
--head dist \
46+
--head dist-to-main-pr \
4247
--title "chore: automated output update (dist)" \
4348
--body "This PR contains updated build output from the dist branch." \
4449
--label "automated pr,dist-update"
4550
env:
46-
GH_TOKEN: ${{ secrets.GH_MERGE_TOKEN }}
51+
GH_TOKEN: ${{ secrets.GH_MERGE_TOKEN }}

.github/workflows/release.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,16 @@ jobs:
6767
- name: Checkout dist branch
6868
run: git checkout -B dist origin/dist || git checkout -b dist
6969

70-
- name: Clear dist/samples
70+
- name: Clear existing dist/samples
7171
run: rm -rf dist/samples/*
72-
72+
7373
- name: Copy Built Output to dist/samples
74-
run: cp -r dist/samples/* dist/samples/
74+
run: |
75+
mkdir -p dist/samples
76+
cp -r ./dist/* dist/samples/
7577
7678
- name: Commit and Push Changes (to dist)
7779
run: |
78-
git add dist/*
80+
git add dist/samples
7981
git commit -m "Update dist folder"
80-
git push --force origin dist
82+
git push --force origin dist

0 commit comments

Comments
 (0)