diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 0000000..72738a6 --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,84 @@ +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 + + - 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: 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: Find and Replace + 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-woocommerce-plugin.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 + + - 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 }} + diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index b3d1fe8..0000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Coverage - -on: [push] - -jobs: - build-test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - uses: php-actions/composer@v6 - - - name: PHPUnit Tests - uses: php-actions/phpunit@v3 - with: - php_extensions: xdebug - bootstrap: vendor/autoload.php - configuration: test/phpunit.xml - args: --coverage-text - env: - XDEBUG_MODE: coverage - TEST_NAME: Scarlett diff --git a/.github/workflows/deploy-to-svn.yml b/.github/workflows/deploy-to-svn.yml deleted file mode 100644 index 4fa2070..0000000 --- a/.github/workflows/deploy-to-svn.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Deploy To SVN - -on: - push: - tags: - - "*.*.*" -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@master - - name: Deploy - run: chmod +x ./deploy.sh && ./deploy.sh - env: - SVN_USERNAME: ${{ openedx-woocommerce }} - SVN_PASSWORD: ${{ CodebullsEdunext*34 }} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..2b3f485 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +## Release v1.0.0 +## [1.0.0](https://github.com/eduNEXT/openedx-woocommerce-plugin/compare/v1.0.0...v1.0.0) (2023-07-05) + + +### Features + +* initial commit ([28de3be](https://github.com/eduNEXT/openedx-woocommerce-plugin/commit/28de3be9ff181986c84f5fef9c9ee1e6fa3706dd))