Skip to content

Commit

Permalink
chore: update release workflow and script for improved GitHub Actions…
Browse files Browse the repository at this point in the history
… integration
  • Loading branch information
lgersman committed Dec 3, 2024
1 parent 99edb1a commit 18c6d36
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ jobs:
pnpm install --frozen-lockfile
export GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}"
export GITHUB_REPOSITORY="${{ github.repository }}"
git remote -v
git checkout "${GITHUB_REF:11}"
export GITHUB_REPOSITORY
echo "GITHUB_REF=${GITHUB_REF}"
git remote -v
pnpm release
Expand Down
10 changes: 9 additions & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,12 @@ set -x
# see https://github.com/actions/checkout/pull/1184#issue-1595060720
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}"
# git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}"

git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"

# https://github.com/IONOS-WordPress/ionos-wordpress.git
# https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/USER/REPO.git

# commit changes
git commit -am "chore(release) : updated versions [skip release]"
Expand All @@ -76,6 +80,10 @@ pnpm changeset tag
# push changes and tags
git push && git push --tags

echo "try 2"
git remote set-url origin https://${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
git push && git push --tags

# ensure ./tmp/release is a fresh empty directory
rm -rf ./tmp/release
mkdir -p ./tmp/release
Expand Down

0 comments on commit 18c6d36

Please sign in to comment.