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

Adds RELEASING.md #94

Merged
merged 1 commit into from
Dec 15, 2023
Merged
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
57 changes: 57 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Releasing
=========

Cutting a Release
---------------------

1. Update `CHANGELOG.md`.

2. Set versions:

```
export RELEASE_VERSION=X.Y.Z
export NEXT_VERSION=X.Y.Z-SNAPSHOT
```

3. Update versions:

```
sed -i "" \
"s/releaseVersion=.*/releaseVersion=$RELEASE_VERSION/g" \
`find . -name "gradle.properties"`
sed -i "" \
"s/'io.outfoxx:\([^\:]*\):[^']*'/'io.outfoxx:\1:$RELEASE_VERSION'/g" \
`find . -name "README.md"`
sed -i "" \
"s/outfoxx.github.io\/swiftpoet\/[^\/]*\/\(.*\)/outfoxx.github.io\/swiftpoet\/$RELEASE_VERSION\/\1/g" \
`find . -name "README.md"`
sed -i "" \
"s/\<version\>\([^<]*\)\<\/version\>/\<version\>$RELEASE_VERSION\<\/version\>/g" \
`find . -name "README.md"`
```

4. Tag the release and push to GitHub.

```
git commit -am "Prepare for release $RELEASE_VERSION."
git tag -a $RELEASE_VERSION -m "Version $RELEASE_VERSION"
git push && git push --tags
```

5. Wait for [GitHub Actions][github_actions] to start building the release.

6. Prepare for ongoing development and push to GitHub.

```
sed -i "" \
"s/VERSION_NAME=.*/VERSION_NAME=$NEXT_VERSION/g" \
`find . -name "gradle.properties"`
git commit -am "Prepare next development version."
git push
```

7. CI will release the artifact and publish the documentation.
Comment on lines +33 to +53
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kdubb can you confirm if that's correct?
Specially, will it be auto-released on sonatype or does one have to log on sonatype and release the artifacts?

There's some config in the root build.gradle.kts but I don't know for instance what githubRelease does.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we'll give it a try and see how it goes!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this looks correct. Note that the release workflow is keyed to the following regex:

on:
  push:
    tags: [ "[0-9]+.[0-9]+.[0-9]+**" ]


[sonatype_issues]: https://issues.sonatype.org/
[sonatype_nexus]: https://oss.sonatype.org/
[github_actions]: https://github.com/outfoxx/swiftpoet/actions