Skip to content

Commit

Permalink
Update release docs now that it's mostly automated
Browse files Browse the repository at this point in the history
Reviewed By: strulovich

Differential Revision: D29586013

fbshipit-source-id: f3898597de9a131c37757093b9ffe80e3b408f7e
  • Loading branch information
cgrushko authored and facebook-github-bot committed Jul 7, 2021
1 parent 0fb25a0 commit 1335001
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/publish_artifacts_on_release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# When a new release is created, publish artifacts to Maven Central / JetBrains Marketplace / etc..
#
# About secrets used here:
# 1. OSSRH_USERNAME, OSSRH_TOKEN: token obtained from https://oss.sonatype.org/
# 2. OSSRH_GPG_SECRET_KEY - private key for signing Maven artifacts
# 3. OSSRH_GPG_SECRET_KEY_PASSWORD - password for unlocking OSSRH_GPG_SECRET_KEY
# 4. JETBRAINS_MARKETPLACE_TOKEN - token obtained from https://plugins.jetbrains.com/author/me/tokens

name: Publish package to Maven Central and JetBrains Marketplace
on:
release:
Expand Down
31 changes: 8 additions & 23 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
# Releasing a New `ktfmt` Version

1. Update `bump_versions.sh` with the version information, and comment out its `exit` command.
2. Run `./bump_versions.sh`.
3. Obtain the private key used to sign `ktfmt` releases, as well as its passphrase.
3. Make sure your `~/.m2/settings.xml` is:

```
<settings>
<servers>
<server>
<id>ossrh</id>
<username>your-jira-id</username>
<password>your-jira-pwd</password>
</server>
</servers>
</settings>
```

4. Run `mvn -Prelease clean deploy`
5. Enter the passphrase when requested.
6. Create a new release at https://github.com/facebookincubator/ktfmt/releases . Use a previous release as a template.
7. Upload release files by dragging them from `core/target/`.

This is terribly manual. We'll hopefully soon improve this using GitHub Actions.
1. Run `./bump_versions.sh $OLD_VERSION $NEW_VERSION` and commit the changes.
2. Create a new Release in GitHub. A GitHub Action is automatically triggered and builds and publishes the artifacts to
1. Maven
2. IntelliJ Plugin marketplace
3. TODO: also automate website generation (https://facebookincubator.github.io/ktfmt/) and the AWS Lambda that powers it. For now, you must clone the repo locally, and manually run some steps.
1. pushd online_formatter; ./build_and_deploy.sh; popd
1. Credentials should be configured using https://docs.aws.amazon.com/cli/latest/topic/config-vars.html#credentials
2. Follow instructions in website/README.md

0 comments on commit 1335001

Please sign in to comment.