Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuous integration workflow #13

Merged
merged 19 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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/[email protected]
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 }}

23 changes: 0 additions & 23 deletions .github/workflows/coverage.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/deploy-to-svn.yml

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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))