From b75435b7bdddce19fea898f53006c5704d215b83 Mon Sep 17 00:00:00 2001 From: Cause Chung Date: Mon, 27 Jan 2025 21:23:25 -0500 Subject: [PATCH 1/3] Test ci release --- .github/workflows/release.yaml | 15 +++++++++------ misc/release.sh | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 13bfe291..6465aadc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,6 +3,9 @@ on: push: tags: - 'release*' + pull_request: + branches: + - master jobs: release: @@ -33,15 +36,15 @@ jobs: run: | . ./misc/release.sh echo "new_version=$(cat NEW_VERSION.cache)" >> "$GITHUB_OUTPUT" - - uses: actions/create-github-app-token@v1 - id: generate-token - with: - app-id: ${{ secrets.PR_APP_ID }} - private-key: ${{ secrets.PR_APP_PRIVATE_KEY }} +# - uses: actions/create-github-app-token@v1 +# id: generate-token +# with: +# app-id: ${{ secrets.PR_APP_ID }} +# private-key: ${{ secrets.PR_APP_PRIVATE_KEY }} - name: Create Pull Request uses: peter-evans/create-pull-request@v7 with: - token: ${{ steps.generate-token.outputs.token }} +# token: ${{ steps.generate-token.outputs.token }} branch: create-pull-request/bump_version base: master delete-branch: true diff --git a/misc/release.sh b/misc/release.sh index 1da0cc6f..f22053cd 100755 --- a/misc/release.sh +++ b/misc/release.sh @@ -28,7 +28,7 @@ snapshotVersion=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceSt version="$(printf '%s' "$snapshotVersion" | sed -e "s/-SNAPSHOT//g")" ./mvnw versions:set -DgenerateBackupPoms=false -DnewVersion="$version" --ntp -B -./mvnw deploy -DskipTests -Prelease --ntp -B # to debug release can add -DskipPublishing=true to prevent actual upload +./mvnw deploy -DskipTests -Prelease --ntp -B -DskipPublishing=true # to debug release can add -DskipPublishing=true to prevent actual upload NEW_VERSION="$(increment_version "$version" 1)-SNAPSHOT" ./mvnw versions:set -DgenerateBackupPoms=false -DnewVersion="$NEW_VERSION" --ntp -B printf '%s' "$NEW_VERSION" > NEW_VERSION.cache From 8f576f825becfb79b78bde91481edcdabb8c8aff Mon Sep 17 00:00:00 2001 From: Cause Chung Date: Mon, 27 Jan 2025 21:34:52 -0500 Subject: [PATCH 2/3] Set action permission in CI --- .github/workflows/release.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6465aadc..62247c0a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -7,6 +7,10 @@ on: branches: - master +permissions: + contents: write + pull-requests: write + jobs: release: runs-on: ubuntu-latest From 1bf5cf0a989b70d4067ab6e56c2c893b39333875 Mon Sep 17 00:00:00 2001 From: Cause Chung Date: Mon, 27 Jan 2025 21:37:37 -0500 Subject: [PATCH 3/3] Revert test marks --- .github/workflows/release.yaml | 9 --------- misc/release.sh | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 62247c0a..f95e5c11 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,9 +3,6 @@ on: push: tags: - 'release*' - pull_request: - branches: - - master permissions: contents: write @@ -40,15 +37,9 @@ jobs: run: | . ./misc/release.sh echo "new_version=$(cat NEW_VERSION.cache)" >> "$GITHUB_OUTPUT" -# - uses: actions/create-github-app-token@v1 -# id: generate-token -# with: -# app-id: ${{ secrets.PR_APP_ID }} -# private-key: ${{ secrets.PR_APP_PRIVATE_KEY }} - name: Create Pull Request uses: peter-evans/create-pull-request@v7 with: -# token: ${{ steps.generate-token.outputs.token }} branch: create-pull-request/bump_version base: master delete-branch: true diff --git a/misc/release.sh b/misc/release.sh index f22053cd..1da0cc6f 100755 --- a/misc/release.sh +++ b/misc/release.sh @@ -28,7 +28,7 @@ snapshotVersion=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceSt version="$(printf '%s' "$snapshotVersion" | sed -e "s/-SNAPSHOT//g")" ./mvnw versions:set -DgenerateBackupPoms=false -DnewVersion="$version" --ntp -B -./mvnw deploy -DskipTests -Prelease --ntp -B -DskipPublishing=true # to debug release can add -DskipPublishing=true to prevent actual upload +./mvnw deploy -DskipTests -Prelease --ntp -B # to debug release can add -DskipPublishing=true to prevent actual upload NEW_VERSION="$(increment_version "$version" 1)-SNAPSHOT" ./mvnw versions:set -DgenerateBackupPoms=false -DnewVersion="$NEW_VERSION" --ntp -B printf '%s' "$NEW_VERSION" > NEW_VERSION.cache