diff --git a/.github/tests/README.md b/.github/tests/README.md new file mode 100644 index 0000000000..a59a11bbbf --- /dev/null +++ b/.github/tests/README.md @@ -0,0 +1,6 @@ +# Test github actions with act + +```bash +act pull_request --container-architecture linux/arm64 -e .github/tests/pull-request.json -j ch +eck-release-pr -P ubuntu-latest=catthehacker/ubuntu:act-latest +``` diff --git a/.github/tests/pull-request.json b/.github/tests/pull-request.json new file mode 100644 index 0000000000..7769d7cc9d --- /dev/null +++ b/.github/tests/pull-request.json @@ -0,0 +1,10 @@ +{ + "pull_request": { + "head": { + "ref": "release/1.2.3" + }, + "base": { + "ref": "master" + } + } +} diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml new file mode 100644 index 0000000000..2d9915abd1 --- /dev/null +++ b/.github/workflows/check-release.yml @@ -0,0 +1,41 @@ +name: Release PR Checks + +on: + workflow_dispatch: + pull_request: + branches: + - master + +jobs: + check-release-pr: + if: startsWith(github.head_ref, 'release/') + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Check for release-notes updates + run: | + if ! git diff --exit-code origin/develop -- public/docs/release-notes.md; then + echo "Release notes updated." + else + echo "Error: Release notes not updated in the PR." + exit 1 + fi + + - name: Compare package.json version with master + run: | + git fetch origin master + MASTER_PACKAGE_VERSION=$(git show origin/master:package.json | jq -r '.version') + BRANCH_PACKAGE_VERSION=$(jq -r '.version' package.json) + + if [ "$BRANCH_PACKAGE_VERSION" != "$MASTER_PACKAGE_VERSION" ]; then + echo "Version bumped in package.json." + else + echo "Error: Version in package.json has not been bumped." + exit 1 + fi + diff --git a/package-lock.json b/package-lock.json index 7edee4664e..82da5cb1bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "codimd", - "version": "2.5.1", + "version": "2.5.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "codimd", - "version": "2.5.1", + "version": "2.5.3", "license": "AGPL-3.0", "dependencies": { "@aws-sdk/client-s3-node": "0.1.0-preview.2", diff --git a/package.json b/package.json index efa829f5ab..da2a000d28 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "codimd", - "version": "2.5.1", + "version": "2.5.3", "description": "Realtime collaborative markdown notes on all platforms.", "keywords": [ "Collaborative", diff --git a/public/docs/release-notes.md b/public/docs/release-notes.md index 9d301c0a6c..63a9e0084f 100644 --- a/public/docs/release-notes.md +++ b/public/docs/release-notes.md @@ -1,6 +1,20 @@ Release Notes === + 2.5.3 2024-01-08 +--- + +[Check out the complete release note][v2_5_3]. Thank you CodiMD community and all our contributors. ❤️ + +[v2_5_3]: https://hackmd.io/@codimd/release-notes/%2F%40codimd%2Fv2_5_3 + +It's a minor fix release that bumps the version number in `package.json` + +## Enhancements + +- Add `codeium-chrome` extension support [#1851](https://github.com/hackmdio/codimd/pull/1851) +- Add `check-release` GitHub action workflow that prevents us from forgetting to update the `package.json` during releases again [#1852](https://github.com/hackmdio/codimd/pull/1852) + 2.5.2 2024-01-05 --- diff --git a/public/views/codimd/head.ejs b/public/views/codimd/head.ejs index 4d59ced1b7..69dd01f615 100644 --- a/public/views/codimd/head.ejs +++ b/public/views/codimd/head.ejs @@ -4,6 +4,7 @@ +