From 9357b4a7aaba07de27f28943051f3f02dee75df6 Mon Sep 17 00:00:00 2001 From: Maria Fernanda Magallanes Zubillaga Date: Thu, 6 Jul 2023 18:09:06 -0500 Subject: [PATCH 1/3] fix: add WC_PAT to have permissions and rename steps --- .github/workflows/continuous-integration.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 72738a6..844216c 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -10,10 +10,12 @@ jobs: version: ${{ steps.tag_version.outputs.new_version }} previous_tag: ${{ steps.tag_version.outputs.previous_tag }} bump_commit_sha: ${{ steps.bumpversion.outputs.commit_hash }} + steps: - - - uses: actions/checkout@v2 - + - uses: actions/checkout@v3 + with: + token: ${{ secrets.WC_PAT }} + - name: Get next version id: tag_version uses: mathieudutour/github-tag-action@v6.1 @@ -23,14 +25,14 @@ jobs: default_prerelease_bump: false dry_run: true - - name: Find and Replace + - name: Update php file uses: jacobtomlinson/gha-find-replace@v3 with: find: "Version: *[0-9.]*" replace: "Version: ${{ steps.tag_version.outputs.new_version }}" include: "openedx-woocommerce-plugin.php" - - name: Find and Replace + - name: Update the readme uses: jacobtomlinson/gha-find-replace@v3 with: find: "Stable tag: *[0-9.]*" @@ -62,8 +64,9 @@ jobs: changelog: ${{ steps.tag_version.outputs.changelog }} steps: - - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + with: + token: ${{ secrets.WC_PAT }} - name: Create tag id: tag_version From 5022c2748ee8a9fa8c5e815737f3030d72930de0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Ramirez=20Giraldo?= <52968528+julianramirez2@users.noreply.github.com> Date: Fri, 7 Jul 2023 11:57:28 -0500 Subject: [PATCH 2/3] fix: changing version in define and PAT key added --- .github/workflows/continuous-integration.yml | 24 +++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 844216c..562cb47 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -10,11 +10,11 @@ jobs: version: ${{ steps.tag_version.outputs.new_version }} previous_tag: ${{ steps.tag_version.outputs.previous_tag }} bump_commit_sha: ${{ steps.bumpversion.outputs.commit_hash }} - steps: - - uses: actions/checkout@v3 + + - uses: actions/checkout@v2 with: - token: ${{ secrets.WC_PAT }} + token: ${{ secrets.WC_PAT }} - name: Get next version id: tag_version @@ -25,14 +25,21 @@ jobs: default_prerelease_bump: false dry_run: true - - name: Update php file + - name: Find and Replace uses: jacobtomlinson/gha-find-replace@v3 with: find: "Version: *[0-9.]*" replace: "Version: ${{ steps.tag_version.outputs.new_version }}" include: "openedx-woocommerce-plugin.php" - - name: Update the readme + - name: Find and Replace + uses: jacobtomlinson/gha-find-replace@v3 + with: + find: "(define\\( 'OPENEDX_WOOCOMMERCE_PLUGIN_VERSION', ')([^']*)(.*);" + replace: "define( 'OPENEDX_WOOCOMMERCE_PLUGIN_VERSION', '${{ steps.tag_version.outputs.new_version }}' );" + include: "openedx-woocommerce-plugin.php" + + - name: Find and Replace uses: jacobtomlinson/gha-find-replace@v3 with: find: "Stable tag: *[0-9.]*" @@ -64,10 +71,11 @@ jobs: changelog: ${{ steps.tag_version.outputs.changelog }} steps: - - uses: actions/checkout@v3 + + - uses: actions/checkout@v2 with: - token: ${{ secrets.WC_PAT }} - + token: ${{ secrets.WC_PAT }} + - name: Create tag id: tag_version uses: mathieudutour/github-tag-action@v6.1 From c5163fd6dda062826871960cd58afc197545d102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Ramirez=20Giraldo?= <52968528+julianramirez2@users.noreply.github.com> Date: Fri, 7 Jul 2023 12:20:47 -0500 Subject: [PATCH 3/3] fix: improved find and replace names --- .github/workflows/continuous-integration.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 562cb47..7fc6f76 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -25,21 +25,21 @@ jobs: default_prerelease_bump: false dry_run: true - - name: Find and Replace + - name: Update php file version - comment uses: jacobtomlinson/gha-find-replace@v3 with: find: "Version: *[0-9.]*" replace: "Version: ${{ steps.tag_version.outputs.new_version }}" include: "openedx-woocommerce-plugin.php" - - name: Find and Replace + - name: Update php file version - define statement uses: jacobtomlinson/gha-find-replace@v3 with: find: "(define\\( 'OPENEDX_WOOCOMMERCE_PLUGIN_VERSION', ')([^']*)(.*);" replace: "define( 'OPENEDX_WOOCOMMERCE_PLUGIN_VERSION', '${{ steps.tag_version.outputs.new_version }}' );" include: "openedx-woocommerce-plugin.php" - - name: Find and Replace + - name: Update README version uses: jacobtomlinson/gha-find-replace@v3 with: find: "Stable tag: *[0-9.]*"