From 18c6d36e50232ff25486f3e93403d2b3340cc932 Mon Sep 17 00:00:00 2001 From: Lars Gersmann Date: Tue, 3 Dec 2024 19:25:27 +0100 Subject: [PATCH] chore: update release workflow and script for improved GitHub Actions integration --- .github/workflows/release.yaml | 5 ++--- scripts/release.sh | 10 +++++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b5aa4fc..ff82fca 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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 diff --git a/scripts/release.sh b/scripts/release.sh index 3a45768..a26e605 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -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]" @@ -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