This is an automated email from the ASF dual-hosted git repository. bchapuis pushed a commit to branch 492-release in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git
commit 3d4e7a1221e62c951a2b82a48dbb7c656548b1de Author: Bertil Chapuis <[email protected]> AuthorDate: Tue Mar 7 13:57:54 2023 +0100 Improve release process --- .github/workflows/release.yml | 88 --------------------------- CONTRIBUTING.md | 3 - DISCLAIMER-WIP | 2 +- README | 2 +- RELEASE.md | 123 ++++++++++++++++++++++++++++++++++++++ baremaps-cli/src/assembly/bin.xml | 2 +- baremaps-cli/src/assembly/src.xml | 3 +- pom.xml | 7 +-- scripts/generate-artifacts.sh | 32 ++++++++++ 9 files changed, 163 insertions(+), 99 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 2fa522f5..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: Release - -on: - push: - tags: - - 'v*' - -jobs: - - github: - name: Release on GitHub - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Set up Java 17 - uses: actions/setup-java@v3 - with: - java-version: 17 - distribution: temurin - - name: Create release - run: | - set -x - echo "$GPG_PRIVATE_KEY" | gpg --import --no-tty --batch --yes - version=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) - ./mvnw install -B - cd ./baremaps-cli/target/ - assets=() - for asset in ./baremaps-$version-incubating-*; do - shasum -a 512 "$asset" > "$asset.sha512" - gpg --no-tty --pinentry-mode loopback --batch --yes --passphrase "$GPG_PASSPHRASE" --output "$asset.asc" --detach-sign --armor "$asset" - assets+=("-a" "$asset") - assets+=("-a" "$asset.sha512") - assets+=("-a" "$asset.asc") - done - tag_name="${GITHUB_REF##*/}" - hub release create "${assets[@]}" -d -m "Baremaps $tag_name" "$tag_name" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} - GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - - -# maven-central: -# name: Release on Maven Central -# runs-on: ubuntu-latest -# steps: -# - name: Checkout code -# uses: actions/checkout@v3 -# - name: Set up Java 17 -# uses: actions/setup-java@v3 -# with: -# java-version: 17 -# distribution: temurin -# server-id: maven -# server-username: MAVEN_USERNAME -# server-password: MAVEN_CENTRAL_TOKEN -# gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} -# gpg-passphrase: MAVEN_GPG_PASSPHRASE -# - name: Build with maven -# run: ./mvnw package -P release -B -# - name: Deploy artifacts -# run: ./mvnw deploy -P release -B -# env: -# MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} -# MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} -# MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - -# dockerhub: -# name: Release on DockerHub -# runs-on: ubuntu-latest -# steps: -# - name: Checkout code -# uses: actions/checkout@v3 -# - name: Login to Docker Hub -# uses: docker/login-action@v1 -# with: -# username: ${{ secrets.DOCKERHUB_USERNAME }} -# password: ${{ secrets.DOCKERHUB_PASSWORD }} -# - name: Set up Java 17 -# uses: actions/setup-java@v3 -# with: -# java-version: 17 -# distribution: temurin -# - name: Build with maven -# run: ./mvnw install -B -# - name: Publish docker image with maven -# run: ./mvnw jib:build -pl baremaps-cli -B diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bf418d8a..93ff52b0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -92,6 +92,3 @@ This file can typically used to [configure](https://www.jetbrains.com/help/idea/ You can run `mvn spotless:apply` to format your code automatically. Finally, verify that your contribution passes all the tests (integration included). Once your everything looks good, we'll merge it. - - - diff --git a/DISCLAIMER-WIP b/DISCLAIMER-WIP index 97c77ea5..aba18ca6 100644 --- a/DISCLAIMER-WIP +++ b/DISCLAIMER-WIP @@ -16,4 +16,4 @@ the project is currently aware of (this list is likely to be incomplete): If you are planning to incorporate this work into your product/project, please be aware that you will need to conduct a thorough licensing review to determine the overall implications of including this work. For the current status of this project through the Apache Incubator, -visit: https://incubator.apache.org/projects/Apache Podling-Name.html \ No newline at end of file +visit: https://incubator.apache.org/projects/Apache Podling-Name.html diff --git a/README b/README index deb4bdc9..1c3bf638 100644 --- a/README +++ b/README @@ -14,4 +14,4 @@ More information about Baremaps can be found on our website: We appreciate any feedback, bug reports, and pull requests, so don't hesitate to reach out! -Happy mapping! \ No newline at end of file +Happy mapping! diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 00000000..3f252768 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,123 @@ +# Release instructions + +In order to release a new version of baremaps, follow these steps: + +- [ ] Notify the mailing list and ask everyone to pause commits on the main branch +- [ ] Create a new issue on GitHub with the title "Release Baremaps <version>" +- [ ] Create a new branch for the release (e.g. `release-<version>`) + +```bash +git checkout -b release-<version> +git push --set-upstream origin release-<version> +``` + +- [ ] Set the release version and commit the changes: + +```bash +mvn versions:set -DnewVersion=<version> +git commit -a -m "Release Baremaps <version>" +``` + +- [ ] Tag the last commit with the release candidate version: + +```bash +git tag v<version>-rc<number> +``` + +- [ ] Push the tag to the remote repository: + +```bash +git push origin v<version>-rc<number> +``` + +- [ ] Generate the release notes for this tag on GitHub. +- [ ] Generate the artifacts: + +```bash +./scripts/generate-artifacts.sh +``` + +- [ ] Publish the artifacts: + +```bash +svn co https://dist.apache.org/repos/dist/dev/incubator/baremaps/ baremaps-dev +mkdir baremaps-dev/<version>-rc<number> +cp ./baremaps-cli/target/baremaps-<version>-incubating-* baremaps-dev/<version>-rc<number>/. +svn commit -m "Baremaps <version>-rc<number>" +``` + +- [ ] Ask the community to vote for the release candidate. +- [ ] If the release candidate is not approved by the community, commit the necessary changes, clean the git history, and go back to step 5. +- [ ] If the release candidate is approved by the community, tag the release commit with the release version: + +```bash +git tag -a v[version] +git push origin v[version] +``` + +- [ ] Publish the artifacts: + +```bash +svn co https://dist.apache.org/repos/dist/release/incubator/baremaps/ baremaps-release +mkdir baremaps-release/<version> +cp ./baremaps-cli/target/baremaps-<version>-incubating-* baremaps-release/<version>/. +svn commit -m "Baremaps <version>" + +- [ ] Set the version of the next iteration and commit the changes: + +```bash +mvn versions:set -DnewVersion=[next_version]-SNAPSHOT +git commit -a -m "Prepare for next development iteration" +git push origin +``` + +- [ ] Rebase the release branch into the main branch. +- [ ] Notify the community of the release by sending a message to the mailing list. +- [ ] Clean up all the release candidate branches and tags. + +## Email template + +subject: [VOTE] Release Apache Baremaps <version>-rc<number> (incubating) + +Hello Everyone, + +I have created a build for Apache Baremaps (incubating) <version>, release candidate <number>. + +Thanks to everyone who has contributed to this release. + +You can read the release notes here: +https://github.com/apache/incubator-baremaps/releases/tag/v<version>-rc<number> + +The commit to be voted upon: +https://github.com/apache/incubator-baremaps/tree/v<version> + +Its hash is <hash>. + +Its tag is v<version>-rc<number>. + +The artifacts to be voted on are located here: +https://dist.apache.org/repos/dist/release/incubator/baremaps/<version>-rc<number>/ + +The hashes of the artifacts are as follows: +<src> +<bin> + +Release artifacts are signed with the following key: +http://people.apache.org/keys/committer/bchapuis.asc +https://downloads.apache.org/incubator/baremaps/KEYS + +The README file for the src distribution contains instructions for building and testing the release. + +Please vote on releasing this package as Apache Baremaps <version>. + +The vote is open for the next 72 hours and passes if a majority of at least three +1 PMC votes are cast. + +[ ] +1 Release this package as Apache Baremaps <version> +[ ] 0 I don't feel strongly about it, but I'm okay with the release +[ ] -1 Do not release this package because... + +Here is my vote: + ++1 (binding) + +[Release manager name] diff --git a/baremaps-cli/src/assembly/bin.xml b/baremaps-cli/src/assembly/bin.xml index 14fbe120..3530b15c 100644 --- a/baremaps-cli/src/assembly/bin.xml +++ b/baremaps-cli/src/assembly/bin.xml @@ -16,7 +16,7 @@ <id>zip</id> <includeBaseDirectory>true</includeBaseDirectory> <formats> - <format>zip</format> + <format>tar.gz</format> </formats> <fileSets> <fileSet> diff --git a/baremaps-cli/src/assembly/src.xml b/baremaps-cli/src/assembly/src.xml index 35522a9a..e57b00e5 100644 --- a/baremaps-cli/src/assembly/src.xml +++ b/baremaps-cli/src/assembly/src.xml @@ -16,7 +16,7 @@ <id>zip</id> <includeBaseDirectory>true</includeBaseDirectory> <formats> - <format>zip</format> + <format>tar.gz</format> </formats> <fileSets> <fileSet> @@ -28,6 +28,7 @@ <include>codestyle.xml</include> <include>DISCLAIMER-WIP</include> <include>LICENSE</include> + <include>LICENSE.header</include> <include>NOTICE</include> <include>README</include> </includes> diff --git a/pom.xml b/pom.xml index 3229486f..ebb0f707 100644 --- a/pom.xml +++ b/pom.xml @@ -51,10 +51,9 @@ </modules> <scm> - <connection>scm:git:[email protected]:baremaps/baremaps.git</connection> - <developerConnection>scm:git:[email protected]:baremaps/baremaps.git</developerConnection> - <tag>v0.2.3</tag> - <url>scm:git:[email protected]:baremaps/baremaps.git</url> + <connection>scm:git:[email protected]:apache/baremaps.git</connection> + <developerConnection>scm:git:[email protected]:apache/baremaps.git</developerConnection> + <url>scm:git:[email protected]:apache/baremaps.git</url> </scm> <distributionManagement> diff --git a/scripts/generate-artifacts.sh b/scripts/generate-artifacts.sh new file mode 100755 index 00000000..aa3d31ac --- /dev/null +++ b/scripts/generate-artifacts.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +# Prompt for GPG_PASSPHRASE +echo "Enter GPG_KEY:" +read -s GPG_KEY + +# Prompt for GPG_PASSPHRASE +echo "Enter GPG_PASSPHRASE:" +read -s GPG_PASSPHRASE + +# Extract the current version with Maven +version=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) + +# Clean and install the project with java 17 in a docker container +docker run \ + -v $(pwd):/baremaps \ + -w /baremaps \ + eclipse-temurin:17-jdk \ + ./mvnw clean install -DskipTests + +# Go to the target directory +cd ./baremaps-cli/target/ + +# Hash and sign the artifacts +for artifact in ./baremaps-$version-incubating-*; do + + # Hash the artifact + shasum -a 512 "$artifact" > "$artifact.sha512" + + # Sign the artifact + gpg --no-tty --quiet --pinentry-mode loopback --default-key "$GPG_KEY" --batch --yes --passphrase "$GPG_PASSPHRASE" --output "$artifact.asc" --detach-sign --armor "$artifact" +done
