Skip to content

Commit c3f9350

Browse files
committed
change per review
1 parent 3f27843 commit c3f9350

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
- "v*"
1414

1515
jobs:
16-
# Corresponsd to tests in tests.yml
16+
# Corresponds to tests in tests.yml
1717
build-with-docker:
1818
name: Build ${{ matrix.dockcross-only }} (Dockcross)
1919
runs-on: ${{ matrix.os }}
@@ -148,15 +148,14 @@ jobs:
148148
if [ -n "$VERSION_INPUT" ]; then
149149
RELEASE_VERSION="$VERSION_INPUT"
150150
else
151-
# Read version from build.gradle.kts or gradle.properties
152-
RELEASE_VERSION=$(grep -E 'version\s*=' build.gradle.kts | sed -E 's/.*\"(.+)-SNAPSHOT\".*/\1/')
151+
RELEASE_VERSION=$(grep -E 'version\s*=' gradle.properties | sed -E 's/.*\"(.+)-SNAPSHOT\".*/\1/')
153152
fi
154153
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
155154
156155
- name: Remove -SNAPSHOT suffix (prepare release version)
157156
if: ${{ github.event_name == 'workflow_dispatch' }}
158157
run: |
159-
sed -i -E "s/${RELEASE_VERSION}-SNAPSHOT/$RELEASE_VERSION/" build.gradle.kts gradle.properties || true
158+
sed -i -E "s/${RELEASE_VERSION}-SNAPSHOT/$RELEASE_VERSION/" gradle.properties || true
160159
git config user.name "github-actions"
161160
git config user.email "[email protected]"
162161
git commit -am "chore: release $RELEASE_VERSION [skip ci]"
@@ -213,11 +212,12 @@ jobs:
213212
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
214213

215214
- name: Bump to next snapshot version
215+
if: ${{ github.event_name != 'workflow_dispatch' }}
216216
run: |
217217
# Bump minor version (for example) and append -SNAPSHOT for continued development
218218
NEXT_VERSION=$(echo $RELEASE_VERSION | awk -F. '{$NF += 1; OFS="."; print $0}') # increment last segment
219219
NEXT_VERSION="$NEXT_VERSION-SNAPSHOT"
220-
sed -i -E "s/$RELEASE_VERSION/$NEXT_VERSION/" build.gradle.kts gradle.properties || true
220+
sed -i -E "s/$RELEASE_VERSION/$NEXT_VERSION/" gradle.properties || true
221221
git config user.name "github-actions"
222222
git config user.email "[email protected]"
223223
git commit -am "chore: start next development cycle $NEXT_VERSION [skip ci]"

docs/releasing.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
The H3-Java library is published to Maven Central via OSSRH.
44

5+
The release is triggered via GitHub Actions, when a tag of the form `v1.2.3` is pushed, or via workflow dispatch. The release workflow handles all parts of the release.
6+
7+
## Old instructions for manual releasing
8+
59
You must be a member of the `com.uber` group to release the library via OSSRH. You must have a [signing key](http://central.sonatype.org/pages/working-with-pgp-signatures.html) setup, and you must have your OSSRH username and password in the appropriate [Maven settings file](http://central.sonatype.org/pages/apache-maven.html).
610

711
Release builds pull artifacts from Github Actions. This is needed so that the deployed artifact contains all supported operating system/architecture combinations. (In particular, Mac OS artifacts must be built natively.) In order to release, there must be a completed build of the Git commit to release on Github. The build must be less than 30 days old, as artifacts are only kept for that time.
@@ -13,14 +17,14 @@ Release builds pull artifacts from Github Actions. This is needed so that the de
1317
5. If this looks good, close and release the build in [Sonatype Nexus Manager](https://oss.sonatype.org/).
1418
6. Update `CHANGELOG.md` to have an Unreleased section, and commit. The release is now done and development can resume from this point.
1519

16-
## Troubleshooting
20+
### Troubleshooting
1721

18-
### Dependencies for `pull-from-github.sh`
22+
#### Dependencies for `pull-from-github.sh`
1923

2024
* You should install the [Github CLI](https://cli.github.com) and authenticate with it first. You may need to use a personal access token (classic) with workflows scope.
2125
* `jq`
2226

23-
### gpg: signing failed: Inappropriate ioctl for device
27+
#### gpg: signing failed: Inappropriate ioctl for device
2428

2529
Per [StackOverflow](https://stackoverflow.com/questions/57591432/gpg-signing-failed-inappropriate-ioctl-for-device-on-macos-with-maven), run the following before `mvn release:perform`:
2630

0 commit comments

Comments
 (0)