Skip to content

Commit ef3ac4c

Browse files
authored
Add version retrieval and update store deployment step [skip ci]
1 parent 65a5aab commit ef3ac4c

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

.github/workflows/deploy.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ jobs:
2020
with:
2121
node-version: 16.x
2222
cache: "yarn"
23+
24+
- name: Get the version
25+
id: get_version
26+
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
2327
- name: Build & create dist/artifact
2428
run: |
2529
yarn install --frozen-lockfile
@@ -58,15 +62,12 @@ jobs:
5862
DEST_DIR: ${{ secrets.AWS_PRODUCTS_FOLDER }}/$BUILD_NAME/$BUILD_VERSION
5963
- name: Send update to the store
6064
env:
61-
THEMEISLE_ID: ${{ secrets.THEMEISLE_ID }}
62-
THEMEISLE_AUTH: ${{ secrets.THEMEISLE_AUTH }}
63-
STORE_URL: ${{ secrets.STORE_URL }}
64-
run: |
65-
if [ ! -z "$THEMEISLE_ID" ]; then
66-
STORE_JSON='{"version": "'$BUILD_VERSION'","id": "'$THEMEISLE_ID'","body": ""}';
67-
echo "$STORE_JSON";
68-
curl -X POST -H 'Cache-Control: no-cache' -H "Content-Type: application/json" -H "x-themeisle-auth: $THEMEISLE_AUTH" --data "$STORE_JSON" "$STORE_URL/wp-json/edd-so/v1/update_changelog/" > /dev/null
69-
fi
65+
PRODUCT_ID: ${{ secrets.THEMEISLE_ID }}
66+
AUTH_TOKEN: ${{ secrets.THEMEISLE_AUTH }}
67+
STORE_URL: ${{ secrets.THEMEISLE_STORE_URL }}
68+
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
69+
BUILD_VERSION: ${{ steps.get_version.outputs.VERSION }}
70+
uses: Codeinwp/action-store-release@main
7071
- name: WordPress Theme Deploy
7172
uses: Codeinwp/action-wordpress-theme-deploy@primary
7273
env:

0 commit comments

Comments
 (0)