Skip to content

Commit

Permalink
chore: fix setup of git user in release scripts, improve names
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Feb 23, 2024
1 parent 5b3467b commit 2931bb0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release_promote-lts.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release > Promote LTS
name: 0. Release > Promote LTS

on:
workflow_dispatch:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release_publish-beta.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release > Beta
name: 0. Release > Beta

on:
workflow_dispatch:
Expand Down Expand Up @@ -46,10 +46,6 @@ jobs:
run: |
echo "Releases may only be performed from the main branch."
exit 1
- name: Make sure git user is setup
run: |
git config --local user.email ${{ secrets.GH_DEPLOY_EMAIL }}
git config --local user.name ${{ secrets.GH_DEPLOY_NAME }}
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-tags: true
Expand All @@ -58,6 +54,10 @@ jobs:
fetch-depth: 3
ref: beta
- run: git fetch origin main --depth=1
- name: Make sure git user is setup
run: |
git config --local user.email ${{ secrets.GH_DEPLOY_EMAIL }}
git config --local user.name ${{ secrets.GH_DEPLOY_NAME }}
- name: Get last beta version from package.json
if: github.event.inputs.kind == 'mirror'
uses: sergeysova/jq-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_publish-canary.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release > Canary
name: 0. Release > Canary

on:
workflow_dispatch:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release_publish-lts.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release > LTS
name: 0. Release > LTS

on:
workflow_dispatch:
Expand Down Expand Up @@ -34,17 +34,17 @@ jobs:
run: |
echo "Releases may only be performed from the main branch."
exit 1
- name: Make sure git user is setup
run: |
git config --local user.email ${{ secrets.GH_DEPLOY_EMAIL }}
git config --local user.name ${{ secrets.GH_DEPLOY_NAME }}
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-tags: true
progress: false
token: ${{ secrets.GH_DEPLOY_TOKEN }}
fetch-depth: 3
ref: ${{ github.event.inputs.source-branch }}
- name: Make sure git user is setup
run: |
git config --local user.email ${{ secrets.GH_DEPLOY_EMAIL }}
git config --local user.name ${{ secrets.GH_DEPLOY_NAME }}
- uses: ./.github/actions/setup
with:
install: true
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release_publish-stable.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release > Stable
name: 0. Release > Stable

on:
workflow_dispatch:
Expand Down Expand Up @@ -58,10 +58,6 @@ jobs:
run: |
echo "Releases may only be performed from the main branch."
exit 1
- name: Make sure git user is setup
run: |
git config --local user.email ${{ secrets.GH_DEPLOY_EMAIL }}
git config --local user.name ${{ secrets.GH_DEPLOY_NAME }}
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-tags: true
Expand All @@ -71,6 +67,10 @@ jobs:
ref: release
## Ensure we have a copy of the source branch
- run: git fetch origin ${{ github.event.inputs.source-branch }} --depth=1
- name: Make sure git user is setup
run: |
git config --local user.email ${{ secrets.GH_DEPLOY_EMAIL }}
git config --local user.name ${{ secrets.GH_DEPLOY_NAME }}
- name: Reset the Release Branch
if: github.event.inputs.source-branch != 'release' && (github.event.inputs.is-cycle-start == 'true' || github.event.inputs.from-version != null)
run: git reset --hard origin/${{ github.event.inputs.source-branch }} && git push origin release -f
Expand Down

0 comments on commit 2931bb0

Please sign in to comment.