diff --git a/.github/workflows/commit-linting.yml b/.github/workflows/commit-linting.yml deleted file mode 100644 index cf89094..0000000 --- a/.github/workflows/commit-linting.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Commit Linting -on: [pull_request] - -jobs: - commitlint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: wagoid/commitlint-github-action@v5 diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml deleted file mode 100644 index 5854332..0000000 --- a/.github/workflows/continuous-integration.yml +++ /dev/null @@ -1,95 +0,0 @@ -name: Continuous Integration -on: - push: - branches: - - main -jobs: - bumpversion: - runs-on: ubuntu-latest - outputs: - 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 - with: - token: ${{ secrets.WC_PAT }} - - - name: Get next version - id: tag_version - uses: mathieudutour/github-tag-action@v6.1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - default_bump: false - default_prerelease_bump: false - dry_run: true - - - 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-commerce.php" - - - name: Update php file version - define statement - uses: jacobtomlinson/gha-find-replace@v3 - with: - find: "(define\\( 'OPENEDX_COMMERCE_VERSION', ')([^']*)(.*);" - replace: "define( 'OPENEDX_COMMERCE_VERSION', '${{ steps.tag_version.outputs.new_version }}' );" - include: "openedx-commerce.php" - - - name: Update README version - uses: jacobtomlinson/gha-find-replace@v3 - with: - find: "Stable tag: *[0-9.]*" - replace: "Stable tag: ${{ steps.tag_version.outputs.new_version }}" - include: "README.txt" - - - name: Update Changelog - if: steps.tag_version.outputs.new_version - uses: stefanzweifel/changelog-updater-action@v1 - with: - latest-version: ${{ steps.tag_version.outputs.new_tag }} - release-notes: ${{ steps.tag_version.outputs.changelog }} - - - name: Commit bumpversion - id: bumpversion - if: steps.tag_version.outputs.new_version - uses: stefanzweifel/git-auto-commit-action@v4 - with: - branch: ${{ github.ref }} - commit_message: "docs(bumpversion): ${{ steps.tag_version.outputs.previous_tag }} → ${{ steps.tag_version.outputs.new_tag }}" - file_pattern: README.txt CHANGELOG.md openedx-commerce.php - - release: - needs: bumpversion - if: needs.bumpversion.outputs.version - runs-on: ubuntu-latest - outputs: - tag: ${{ steps.tag_version.outputs.new_tag }} - changelog: ${{ steps.tag_version.outputs.changelog }} - - steps: - - - uses: actions/checkout@v2 - with: - token: ${{ secrets.WC_PAT }} - - - name: Create tag - id: tag_version - uses: mathieudutour/github-tag-action@v6.1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - commit_sha: ${{ needs.bumpversion.outputs.bump_commit_sha }} - default_bump: false - default_prerelease_bump: false - - - name: Create a GitHub release - if: steps.tag_version.outputs.new_tag - uses: ncipollo/release-action@v1 - with: - tag: ${{ steps.tag_version.outputs.new_tag }} - name: Release ${{ steps.tag_version.outputs.new_tag }} - body: ${{ steps.tag_version.outputs.changelog }} - artifacts: "openedx-commerce.zip" diff --git a/.github/workflows/upload-release-zip.yml b/.github/workflows/upload-release-zip.yml index c9158ab..f353378 100644 --- a/.github/workflows/upload-release-zip.yml +++ b/.github/workflows/upload-release-zip.yml @@ -1,11 +1,8 @@ -name: Build & Upload zip +name: Upload zip to latest release -# Only trigger, when the build workflow succeeded on: - workflow_run: - workflows: ["Continuous Integration"] - types: - - completed + release: + types: [published] jobs: upload_zip: diff --git a/.github/workflows/wordpress-cs-check.yml b/.github/workflows/wordpress-cs-check.yml index 6ee6f24..ef7cab6 100644 --- a/.github/workflows/wordpress-cs-check.yml +++ b/.github/workflows/wordpress-cs-check.yml @@ -31,3 +31,8 @@ jobs: - name: Show PHPCS results in PR if: ${{ always() && steps.phpcs.outcome == 'failure' }} run: cs2pr ./phpcs-report.xml + + - name: Run plugin check + uses: swissspidy/wp-plugin-check-action@v1 + with: + checks: 'plugin_readme'