From b1f9d2ed6151ffcaf1de1928ab8bd27aabc5914a Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 3 Jan 2023 11:57:01 -0500 Subject: [PATCH 01/11] Testing create-pull-request action --- .github/workflows/release.yml | 46 +++++++++++++++-------------------- CHANGELOG.md | 1 - 2 files changed, 19 insertions(+), 28 deletions(-) delete mode 100644 CHANGELOG.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5d3c856..ba15c1e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,8 @@ jobs: # Checkout project repository - name: Checkout uses: actions/checkout@v2.3.4 + with: + ref: enable-auto-commit # Setup Node.js environment - name: Setup Node.js @@ -45,38 +47,28 @@ jobs: # Bump package version # Use tag latest - name: Bump release version - if: startsWith(github.event.inputs.release-type, 'pre') != true run: | echo "NEW_VERSION=$(npm --no-git-tag-version version $RELEASE_TYPE)" >> $GITHUB_ENV echo "RELEASE_TAG=latest" >> $GITHUB_ENV env: RELEASE_TYPE: ${{ github.event.inputs.release-type }} - # Update changelog unreleased section with new version - # - name: Update changelog - # uses: superfaceai/release-changelog-action@v1 - # with: - # path-to-changelog: CHANGELOG.md - # version: ${{ env.NEW_VERSION }} - # operation: release - - # Commit changes - # - name: Commit CHANGELOG.md and package.json changes and create tag - # run: | - # git add "package.json" - # git add "CHANGELOG.md" - # git commit -m "chore: release ${{ env.NEW_VERSION }}" - # git tag ${{ env.NEW_VERSION }} + # Create PR for version bump + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4 + with: + title: "Release ${{ env.NEW_VERSION }}" + branch: "release_${{ env.NEW_VERSION }}" - # Publish version to public repository - - name: Publish - run: yarn publish --verbose --access public --tag ${{ env.RELEASE_TAG }} - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + # # Publish version to public repository + # - name: Publish + # run: yarn publish --verbose --access public --tag ${{ env.RELEASE_TAG }} + # env: + # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - # Push repository changes - - name: Push changes to repository - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git push origin && git push --tags \ No newline at end of file + # # Push repository changes + # - name: Push changes to repository + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # run: | + # git push origin && git push --tags \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 19ad7ff..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -This package is currently in alpha for public testing \ No newline at end of file From 6003fd7221889757f8ef15a83d99c91ecb4fbfd5 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 3 Jan 2023 12:15:14 -0500 Subject: [PATCH 02/11] Automerge PR --- .github/workflows/release.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ba15c1e..4f01386 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,11 +55,29 @@ jobs: # Create PR for version bump - name: Create Pull Request + id: cpr uses: peter-evans/create-pull-request@v4 with: title: "Release ${{ env.NEW_VERSION }}" branch: "release_${{ env.NEW_VERSION }}" + # Automatically approve PR + - name: Auto approve + if: steps.cpr.outputs.pull-request-operation == 'created' + uses: juliangruber/approve-pull-request-action@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + number: ${{ steps.cpr.outputs.pull-request-number }} + + # Automatically merge PR + - name: Enable Pull Request Automerge + if: steps.cpr.outputs.pull-request-operation == 'created' + uses: peter-evans/enable-pull-request-automerge@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} + merge-method: squash + # # Publish version to public repository # - name: Publish # run: yarn publish --verbose --access public --tag ${{ env.RELEASE_TAG }} From bc89a013f1de3d30d65358bce2fe98ef836ce9a0 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 3 Jan 2023 12:18:41 -0500 Subject: [PATCH 03/11] Remove approval step --- .github/workflows/release.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4f01386..afee2fe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,16 +61,8 @@ jobs: title: "Release ${{ env.NEW_VERSION }}" branch: "release_${{ env.NEW_VERSION }}" - # Automatically approve PR - - name: Auto approve - if: steps.cpr.outputs.pull-request-operation == 'created' - uses: juliangruber/approve-pull-request-action@v2 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - number: ${{ steps.cpr.outputs.pull-request-number }} - # Automatically merge PR - - name: Enable Pull Request Automerge + - name: Automerge Pull Request if: steps.cpr.outputs.pull-request-operation == 'created' uses: peter-evans/enable-pull-request-automerge@v2 with: From 4c099d3b9af559f6b04bfdd2b288087c813b0464 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 3 Jan 2023 13:08:09 -0500 Subject: [PATCH 04/11] Re-add automatic approval --- .github/workflows/release.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index afee2fe..23f8a69 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,13 +60,23 @@ jobs: with: title: "Release ${{ env.NEW_VERSION }}" branch: "release_${{ env.NEW_VERSION }}" + delete-branch: true + token: ${{ secrets.PAT }} + + # Automatically approve PR + - name: Auto approve + if: steps.cpr.outputs.pull-request-operation == 'created' + uses: juliangruber/approve-pull-request-action@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + number: ${{ steps.cpr.outputs.pull-request-number }} # Automatically merge PR - name: Automerge Pull Request if: steps.cpr.outputs.pull-request-operation == 'created' uses: peter-evans/enable-pull-request-automerge@v2 with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.PAT }} pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} merge-method: squash From 8d153fee6ddcbe96e002ecdbb28fb7496e85174f Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 3 Jan 2023 13:14:58 -0500 Subject: [PATCH 05/11] Flip order of enabling automerge and approving --- .github/workflows/release.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 23f8a69..05cdb4a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,6 +63,15 @@ jobs: delete-branch: true token: ${{ secrets.PAT }} + # Enable automerge for PR + - name: Enable automerge + if: steps.cpr.outputs.pull-request-operation == 'created' + uses: peter-evans/enable-pull-request-automerge@v2 + with: + token: ${{ secrets.PAT }} + pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} + merge-method: squash + # Automatically approve PR - name: Auto approve if: steps.cpr.outputs.pull-request-operation == 'created' @@ -71,15 +80,6 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} number: ${{ steps.cpr.outputs.pull-request-number }} - # Automatically merge PR - - name: Automerge Pull Request - if: steps.cpr.outputs.pull-request-operation == 'created' - uses: peter-evans/enable-pull-request-automerge@v2 - with: - token: ${{ secrets.PAT }} - pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} - merge-method: squash - # # Publish version to public repository # - name: Publish # run: yarn publish --verbose --access public --tag ${{ env.RELEASE_TAG }} From 30c282b519cc4240fd2bfdffd1ea2c8fa95104d9 Mon Sep 17 00:00:00 2001 From: Dylan Manchester <78382743+dylan-manchester@users.noreply.github.com> Date: Tue, 3 Jan 2023 13:16:48 -0500 Subject: [PATCH 06/11] [create-pull-request] automated change (#34) Co-authored-by: dylan-manchester --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3f278e6..b190c70 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-activitykit", - "version": "0.0.1", + "version": "0.0.2", "description": "test", "main": "lib/commonjs/index", "module": "lib/module/index", From c78d6d306e64659e6b171a2e6441547b7421d503 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 3 Jan 2023 13:19:45 -0500 Subject: [PATCH 07/11] Revert "[create-pull-request] automated change (#34)" This reverts commit 30c282b519cc4240fd2bfdffd1ea2c8fa95104d9. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b190c70..3f278e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-activitykit", - "version": "0.0.2", + "version": "0.0.1", "description": "test", "main": "lib/commonjs/index", "module": "lib/module/index", From 1552f65c615de8bd7e125b5a6fc46595c2ec65d9 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 3 Jan 2023 13:24:34 -0500 Subject: [PATCH 08/11] Fix commit message --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 05cdb4a..f56c571 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,6 +59,7 @@ jobs: uses: peter-evans/create-pull-request@v4 with: title: "Release ${{ env.NEW_VERSION }}" + commit-message: "Release ${{ env.NEW_VERSION }}" branch: "release_${{ env.NEW_VERSION }}" delete-branch: true token: ${{ secrets.PAT }} From d4d76cd72cdfb9be9dad468f3895fddd576d20f5 Mon Sep 17 00:00:00 2001 From: Dylan Manchester <78382743+dylan-manchester@users.noreply.github.com> Date: Tue, 3 Jan 2023 13:26:24 -0500 Subject: [PATCH 09/11] Release v0.1.0 (#35) Co-authored-by: dylan-manchester --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3f278e6..d551e88 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-activitykit", - "version": "0.0.1", + "version": "0.1.0", "description": "test", "main": "lib/commonjs/index", "module": "lib/module/index", From cad68e0e1ba6f8f6a5b1f67ac4c006358149a902 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 3 Jan 2023 13:32:24 -0500 Subject: [PATCH 10/11] Revert "Release v0.1.0 (#35)" This reverts commit d4d76cd72cdfb9be9dad468f3895fddd576d20f5. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d551e88..3f278e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-activitykit", - "version": "0.1.0", + "version": "0.0.1", "description": "test", "main": "lib/commonjs/index", "module": "lib/module/index", From 3ebe61ce82df09ed0396bede7ac4577ecc049b48 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 3 Jan 2023 13:32:53 -0500 Subject: [PATCH 11/11] LIVE: Re-added publish step --- .github/workflows/release.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f56c571..1689cd4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -81,15 +81,8 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} number: ${{ steps.cpr.outputs.pull-request-number }} - # # Publish version to public repository - # - name: Publish - # run: yarn publish --verbose --access public --tag ${{ env.RELEASE_TAG }} - # env: - # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - # # Push repository changes - # - name: Push changes to repository - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # run: | - # git push origin && git push --tags \ No newline at end of file + # Publish version to public repository + - name: Publish + run: yarn publish --verbose --access public --tag ${{ env.RELEASE_TAG }} + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file