Skip to content

Commit

Permalink
fix: correct the ci workflows (#14)
Browse files Browse the repository at this point in the history
* fix: add WC_PAT to have permissions and rename steps

* fix: changing version in define and PAT key added

* fix: improved find and replace names

---------

Co-authored-by: Julián Ramirez Giraldo <[email protected]>
  • Loading branch information
MaferMazu and julianramirez2 authored Jul 7, 2023
1 parent fbe5e10 commit a8c2bb4
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ jobs:
steps:

- uses: actions/checkout@v2

with:
token: ${{ secrets.WC_PAT }}

- name: Get next version
id: tag_version
uses: mathieudutour/[email protected]
Expand All @@ -23,14 +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: Update README version
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "Stable tag: *[0-9.]*"
Expand Down Expand Up @@ -64,7 +73,9 @@ jobs:
steps:

- uses: actions/checkout@v2

with:
token: ${{ secrets.WC_PAT }}

- name: Create tag
id: tag_version
uses: mathieudutour/[email protected]
Expand Down

0 comments on commit a8c2bb4

Please sign in to comment.