Skip to content

Commit ae1ae30

Browse files
committed
wip
1 parent bdee4c5 commit ae1ae30

File tree

2 files changed

+37
-4
lines changed

2 files changed

+37
-4
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111

1212
jobs:
1313
create-release-pr:
14-
name: Create a Pull Request for the release
14+
name: Create a pull request for the release
1515
runs-on: ubuntu-latest
1616

1717
steps:
@@ -21,7 +21,7 @@ jobs:
2121
- name: Checkout repository
2222
uses: actions/checkout@v4
2323
with:
24-
# This token allows committing modifications on workflow files (read/write on Contents and Workflows permissions)
24+
# This token allows committing modifications on workflow files (read/write on Contents, Pull Requests, and Workflows permissions)
2525
token: ${{ secrets.RELEASE_TOKEN }}
2626

2727
- name: Write a new release to CHANGELOG.md
@@ -49,10 +49,33 @@ jobs:
4949
# The tail command is used to remove an unnecessary title from the changelog.
5050
run: chan show $RELEASE_VERSION | tail -n +2 | gh release create $RELEASE_VERSION --title "Akkurate $RELEASE_VERSION" --draft --notes-file -
5151

52-
- name: Create a Pull Request
52+
- name: Create a pull request
5353
env:
5454
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
55-
run: gh pr create --assignee nesk --base main --head release/$RELEASE_VERSION --title "Release $RELEASE_VERSION" --body "New release" -d
55+
run: |
56+
gh pr create --assignee nesk --base main --head release/$RELEASE_VERSION --title "Release $RELEASE_VERSION" --body "This a pull request for releasing version $RELEASE_VERSION of Akkurate.
57+
58+
### Before merging this pull-request
59+
#### Maven Central Repository
60+
Head to the [Nexus Repository Manager](https://s01.oss.sonatype.org/#stagingRepositories) and verify if the newly created staging repository is valid, meaning:
61+
62+
- all the artifacts are present (root directories starting with `akkurate-` in the sources);
63+
- each artifact is built for nearly [all multiplatform targets](https://kotlinlang.org/docs/multiplatform-dsl-reference.html#targets);
64+
- and all the files are signed with multiple `.asc` variations.
65+
66+
If everything is compliant to this checklist, close the repository, then release it.
67+
68+
#### GitHub release
69+
Open the draft release created on GitHub. You can edit the description of the release to add any additional content you want, _but leave the changelog as-is._ Once you're satisfied, publish the release.
70+
71+
#### Finalize everything
72+
Once everything above is done, you can merge this pull request.
73+
74+
### Aborting the release
75+
In case you want to cancel everything and restart from a clean slate:
76+
77+
- Delete the tag and the branch: `git push --delete origin $RELEASE_VERSION release/$RELEASE_VERSION`
78+
- Delete the release: `gh release delete $RELEASE_VERSION`"
5679
5780
publish:
5881
name: Publish to Maven Central Repository

CONTRIBUTING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,13 @@ If you're fixing a bug, create a new test reproducing the bug to avoid future re
2121

2222
New code should be tested with a significant code coverage score (you can check it by using **Run | Run with Coverage**
2323
in IntelliJ).
24+
25+
## Releasing
26+
27+
The release process is almost entirely automated. You only have to
28+
trigger [the release workflow](.github/workflows/release.yml)
29+
and then follow the instructions of the created pull request.
30+
31+
```shell
32+
gh workflow run release.yml -f version=1.2.3
33+
```

0 commit comments

Comments
 (0)