diff --git a/.github/workflows/release-github.yml b/.github/workflows/release-github.yml new file mode 100644 index 0000000000..88b128a59f --- /dev/null +++ b/.github/workflows/release-github.yml @@ -0,0 +1,18 @@ +name: Release GitHub + +on: + push: + branches: [release/*] + +jobs: + create-github-release: + name: Create GitHub Release and Git tag + runs-on: ubuntu-latest + environment: Release + permissions: + contents: write + steps: + - uses: actions/checkout@v3 + - uses: cucumber/action-create-github-release@v1.1.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-java.yml b/.github/workflows/release-java.yml new file mode 100644 index 0000000000..1964ad8fa3 --- /dev/null +++ b/.github/workflows/release-java.yml @@ -0,0 +1,24 @@ +name: Release Maven + +on: + push: + branches: [release/*] + +jobs: + publish-mvn: + name: Publish Maven Package + runs-on: ubuntu-latest + environment: Release + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '11' + cache: 'maven' + - uses: cucumber/action-publish-mvn@v2.0.0 + with: + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} + nexus-username: ${{ secrets.SONATYPE_USERNAME }} + nexus-password: ${{ secrets.SONATYPE_PASSWORD }} diff --git a/.github/workflows/build.yml b/.github/workflows/test-java.yml similarity index 85% rename from .github/workflows/build.yml rename to .github/workflows/test-java.yml index 9edfaa523d..c9b857dac7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/test-java.yml @@ -1,9 +1,10 @@ -name: Cucumber CI +name: Test Java on: pull_request: branches: - '**' + workflow_call: push: branches: - main @@ -31,9 +32,9 @@ jobs: with: version: '11' - name: Install dependencies - run: mvn install -DskipTests=true -DskipITs=true -Darchetype.test.skip=true -Dmaven.javadoc.skip=true -B --show-version + run: mvn install -Pinclude-extra-modules -DskipTests=true -DskipITs=true -Darchetype.test.skip=true -Dmaven.javadoc.skip=true -B --show-version - name: Test - run: mvn verify + run: mvn verify -Pinclude-extra-modules env: CUCUMBER_PUBLISH_TOKEN: ${{ secrets.CUCUMBER_PUBLISH_TOKEN }} @@ -75,9 +76,9 @@ jobs: with: version: '11' - name: Install dependencies - run: mvn install -DskipTests=true -DskipITs=true -Darchetype.test.skip=true -Dmaven.javadoc.skip=true --batch-mode --show-version + run: mvn install -Pinclude-extra-modules -DskipTests=true -DskipITs=true -Darchetype.test.skip=true -Dmaven.javadoc.skip=true --batch-mode --show-version - name: Test (Coverage) - run: mvn jacoco:prepare-agent verify jacoco:report + run: mvn jacoco:prepare-agent verify jacoco:report -Pinclude-extra-modules - uses: codecov/codecov-action@v3 with: fail_ci_if_error: true diff --git a/Makefile b/Makefile index 94184c599f..d209d54bf6 100644 --- a/Makefile +++ b/Makefile @@ -29,53 +29,3 @@ endif cp -r target/compatibility-kit/devkit/samples/* compatibility/src/test/resources/features rm -rf target/compatibility-kit .PHONY: update-cck - -update-dependency-versions: - mvn versions:force-releases - mvn versions:update-properties -DallowMajorUpdates=false -Dmaven.version.rules="file://`pwd`/.versions/rules.xml" -.PHONY: update-dependency-versions - -update-major-dependency-versions: - mvn versions:force-releases - mvn versions:update-properties -DallowMajorUpdates=true -Dmaven.version.rules="file://`pwd`/.versions/rules.xml" -.PHONY: update-major-dependency-versions - -update-changelog: - cat CHANGELOG.md | ./scripts/update-changelog.sh $(NEW_VERSION) > CHANGELOG.md.tmp - mv CHANGELOG.md.tmp CHANGELOG.md -.PHONY: update-changelog - -.commit-and-push-changelog: - git commit -am "Update CHANGELOG for v$(NEW_VERSION)" - git push -.PHONY: .commit-and-push-changelog - -.configure-cukebot-in-docker: - [ -f '/home/cukebot/configure' ] && /home/cukebot/configure -.PHONY: .configure-cukebot-in-docker - -.release-in-docker: .configure-cukebot-in-docker default update-changelog .commit-and-push-changelog - mvn --batch-mode release:clean release:prepare -DautoVersionSubmodules=true -Darguments="-DskipTests=true -DskipITs=true -Darchetype.test.skip=true" - git checkout "v$(NEW_VERSION)" - mvn deploy -P-build-in-ci -Psign-source-javadoc -DskipTests=true -DskipITs=true -Darchetype.test.skip=true - git checkout $(CURRENT_BRANCH) - git fetch -.PHONY: .release-in-docker - -release: - [ -d '../secrets' ] || git clone keybase://team/cucumberbdd/secrets ../secrets - git -C ../secrets pull - ../secrets/update_permissions - docker run \ - --volume "${shell pwd}":/app \ - --volume "${shell pwd}/../secrets/configure":/home/cukebot/configure \ - --volume "${shell pwd}/../secrets/codesigning.key":/home/cukebot/codesigning.key \ - --volume "${shell pwd}/../secrets/gpg-with-passphrase":/home/cukebot/gpg-with-passphrase \ - --volume "${shell pwd}/../secrets/.ssh":/home/cukebot/.ssh \ - --volume "${HOME}/.m2/repository":/home/cukebot/.m2/repository \ - --env-file "${shell pwd}/../secrets/secrets.list" \ - --user 1000 \ - --rm \ - -it cucumber/cucumber-build:0.1.0@sha256:2ce049493dfadad62b78594e6728d1f85ccc5a2441b5a8b3f7a106a7bba39ec1 \ - make .release-in-docker -.PHONY: release diff --git a/RELEASING.md b/RELEASING.md index c6591bcb85..e5ac98363b 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,71 +1,6 @@ -Releasing -========= +See [.github/RELEASING](https://github.com/cucumber/.github/blob/main/RELEASING.md). -The deployment process of `cucumber-jvm` is based on -[Deploying to OSSRH with Apache Maven](http://central.sonatype.org/pages/apache-maven.html#deploying-to-ossrh-with-apache-maven-introduction). - -## Check [![Build Status](https://github.com/cucumber/cucumber-jvm/workflows/Cucumber%20CI/badge.svg)](https://github.com/cucumber/cucumber-jvm/actions) ## - -Is the build passing? - -``` -git checkout main -``` - -Also check if you can upgrade any dependencies: - -``` -make update-dependency-versions -``` - -## Decide what the next version should be ## - -Versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html). To sum it up, it depends on what's changed (see `CHANGELOG.md`). Given a version number MAJOR.MINOR.PATCH: - -* Bump `MAJOR` when you make incompatible API changes: - * There are `Removed` entries, or `Changed` entries breaking compatibility - * A cucumber library dependency upgrade was major -* Bump `MINOR` when you add functionality in a backwards compatible manner: - * There are `Added` entries, `Changed` entries preserving compatibility, or - `Deprecated` entries -* Bump `PATCH` when you make backwards compatible bug fixes: - * There are `Fixed` entries - -Display future version by running: - -``` -make version -``` - -Check if branch name and version are as expected. To change version run: - -``` -mvn versions:set -DnewVersion=X.Y.Z-SNAPSHOT -``` - -## Secrets ## - -Secrets are required to make releases. Members of the core team can install -keybase and join the `cucumberbdd` team to access these secrets. - -During the release process, secrets are fetched from keybase and used to sign -and upload the maven artifacts. - -## Make the release ## - -Check if branch name and version are as expected: - -``` -make version -``` - -Do the release: - -``` -make release -``` - -## Last bits ## +## When done ## Update the cucumber-jvm version in the documentation project: diff --git a/pom.xml b/pom.xml index 00f6e08915..adeaa697d7 100644 --- a/pom.xml +++ b/pom.xml @@ -92,18 +92,25 @@ + + + include-extra-modules + + examples + compatibility + + + build-in-ci - CI + env.CI true - - examples - compatibility -