From 164a3bebe87b7fa349cd10604f5ff0ac94f8f6bd Mon Sep 17 00:00:00 2001 From: Michael Wuergler Date: Mon, 19 Feb 2024 00:24:01 +0100 Subject: [PATCH 1/2] ci: open a PR with version bump after successful publish. --- .github/workflows/publish.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 711761d..02cb44d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,10 +6,10 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: '16.x' + node-version: '18.x' registry-url: 'https://registry.npmjs.org' - run: git config --global user.email "wuergler@gmail.com" - run: git config --global user.name "Michael Wuergler" @@ -21,3 +21,15 @@ jobs: - run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + # This step will only run if all previous steps have succeeded + - name: Create Pull Request for Version Bump + if: success() + uses: peter-evans/create-pull-request@v6 + with: + commit-message: Update package version + title: 'chore: update package version to ${{ env.RELEASE_VERSION }}' + body: 'Updates `package.json` version to `${{ env.RELEASE_VERSION }}`.' + branch: version-bump/${{ env.RELEASE_VERSION }} + labels: version-bump + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 45ec7f3dd048a86c5763890d95935ec133b7f401 Mon Sep 17 00:00:00 2001 From: Michael Wuergler Date: Mon, 19 Feb 2024 00:26:18 +0100 Subject: [PATCH 2/2] build: add EOL --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 02cb44d..8bba9c9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -32,4 +32,4 @@ jobs: body: 'Updates `package.json` version to `${{ env.RELEASE_VERSION }}`.' branch: version-bump/${{ env.RELEASE_VERSION }} labels: version-bump - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + token: ${{ secrets.GITHUB_TOKEN }}