|
| 1 | +## Automation using Github Actions |
| 2 | + |
| 3 | +* Bump version |
| 4 | + * `Environment.java` (This should ideally pickup from pom.xml dynamically) |
| 5 | + * `pom.xml` - version & scm > tag |
| 6 | +* commit with following git message `:bookmark: tag` |
| 7 | +* Draft a new release and publish |
| 8 | +* Github actions should automatically release the jar to Maven. |
| 9 | + |
| 10 | +### Updating GPG key in Github actions |
| 11 | + |
| 12 | +* Import private GPG key present in [1pass](#import-the-private-signing-key) |
| 13 | +* find the imported key |
| 14 | +```sh |
| 15 | +gpg --list-secret-keys |
| 16 | +``` |
| 17 | +* update GPG key [expiry date]((#on-gpg-key-management)) if required |
| 18 | +* copy GPG key so it can be pasted on Github as `MAVEN_GPG_PRIVATE_KEY` |
| 19 | +```sh |
| 20 | +gpg --export-secret-keys -a <> | pbcopy |
| 21 | +``` |
| 22 | + |
| 23 | +* update `MAVEN_GPG_PASSPHRASE` if required on Github (generally this doesn't change) |
| 24 | + |
| 25 | + |
| 26 | +--- |
| 27 | + |
| 28 | +## Manual setup |
| 29 | + |
| 30 | +Only do if required. |
| 31 | + |
1 | 32 | ## To make a release |
2 | 33 |
|
3 | 34 | 1. One-time setup: |
@@ -62,14 +93,14 @@ Create a local `settings.xml` file, placed in `~/.m2/settings.xml`, which will c |
62 | 93 | <server> |
63 | 94 | <!-- this server id has to match the id used in the repository section of our pom.xml --> |
64 | 95 | <id>ossrh</id> |
65 | | - <username>USERNAME</username> |
66 | | - <password>USER_TOKEN</password> |
| 96 | + <username>OSSRH_USERNAME</username> |
| 97 | + <password>OSSRH_TOKEN</password> |
67 | 98 | </server> |
68 | 99 | </servers> |
69 | 100 | </settings> |
70 | 101 | ``` |
71 | 102 |
|
72 | | -The username and token can be generated from https://oss.sonatype.org. Log in with the percy-io credentials, then go to the top right menu (appears clicking on your username) > Profile > select "User token" from the dropdown that also has a "Summary" section. Hit "Access User Token" to get the username and token to use in this file. The token can also be regenerated from this UI, should that ever be necessary. |
| 103 | +The username and token can be generated from https://oss.sonatype.org. Log in with the percy-io credentials, then go to the top right menu (appears clicking on your username) > Profile > select "User token" from the dropdown that also has a "Summary" section. Hit "Access User Token" to get the `OSSRH_USERNAME` and `OSSRH_TOKEN` to use in this file. The token can also be regenerated from this UI, should that ever be necessary. |
73 | 104 |
|
74 | 105 | For detailed documentation on the format of `settings.xml`, see: http://maven.apache.org/ref/3.6.0/maven-settings/settings.html |
75 | 106 |
|
|
0 commit comments