Skip to content

Commit

Permalink
Merge branch 'trunk' of https://github.com/gocodebox/lifterlms into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 19, 2022
2 parents aa77d1a + 0b8bb18 commit 76b6573
Showing 1 changed file with 32 additions and 5 deletions.
37 changes: 32 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,27 @@ on:
- published

jobs:

check-secrets:
name: "Check for required secrets"
runs-on: ubuntu-latest
outputs:
has-secret: ${{ steps.check-secret.outputs.has-secrets }}
steps:
- name: Test secrets
id: check-secrets
run: |
if [ ! -z "${{ secrets.LLMS_COM_API_URL }}" && ! -z "${{ secrets.LLMS_COM_API_KEY }}" ]; then
echo "::set-output name=has-secrets::true"
fi
update-metadata:
name: "Update Metadata at LifterLMS.com"
name: "Update product metadata at LifterLMS.com"
runs-on: ubuntu-latest

needs: check-secrets
if: ${{ 'true' == needs.check-secrets.outputs.has-secrets }}

steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -34,7 +51,17 @@ jobs:
- name: Test metadata
run: |
echo $__LLMS_PKG_VERSION
echo $__LLMS_WP_VERSION
echo $__LLMS_PHP_VERSION
echo $__LLMS_LLMS_VERSION
echo "Package version: $__LLMS_PKG_VERSION"
echo "Min WP Version: $__LLMS_WP_VERSION"
echo "Min PHP Version: $__LLMS_PHP_VERSION"
echo "Min LLMS Version: $__LLMS_LLMS_VERSION"
- name: Update metadata
run: |
curl --location --request PATCH "${{ secrets.LLMS_COM_API_URL }}v3/products/${{ github.event.repository.name }}" \
--header "X-API-KEY: ${{ secrets.LLMS_COM_API_KEY }}" \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode "version=$__LLMS_PKG_VERSION" \
--data-urlencode "wp_version=$__LLMS_WP_VERSION"
--data-urlencode "php_version=$__LLMS_PHP_VERSION" \
--data-urlencode "llms_version=$__LLMS_LLMS_VERSION" \

0 comments on commit 76b6573

Please sign in to comment.