Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
nesk committed Dec 26, 2024
1 parent bdee4c5 commit ae1ae30
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 4 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:

jobs:
create-release-pr:
name: Create a Pull Request for the release
name: Create a pull request for the release
runs-on: ubuntu-latest

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

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

- name: Create a Pull Request
- name: Create a pull request
env:
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: gh pr create --assignee nesk --base main --head release/$RELEASE_VERSION --title "Release $RELEASE_VERSION" --body "New release" -d
run: |
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.
### Before merging this pull-request
#### Maven Central Repository
Head to the [Nexus Repository Manager](https://s01.oss.sonatype.org/#stagingRepositories) and verify if the newly created staging repository is valid, meaning:
- all the artifacts are present (root directories starting with `akkurate-` in the sources);
- each artifact is built for nearly [all multiplatform targets](https://kotlinlang.org/docs/multiplatform-dsl-reference.html#targets);
- and all the files are signed with multiple `.asc` variations.
If everything is compliant to this checklist, close the repository, then release it.
#### GitHub release
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.
#### Finalize everything
Once everything above is done, you can merge this pull request.
### Aborting the release
In case you want to cancel everything and restart from a clean slate:
- Delete the tag and the branch: `git push --delete origin $RELEASE_VERSION release/$RELEASE_VERSION`
- Delete the release: `gh release delete $RELEASE_VERSION`"
publish:
name: Publish to Maven Central Repository
Expand Down
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,13 @@ If you're fixing a bug, create a new test reproducing the bug to avoid future re

New code should be tested with a significant code coverage score (you can check it by using **Run | Run with Coverage**
in IntelliJ).

## Releasing

The release process is almost entirely automated. You only have to
trigger [the release workflow](.github/workflows/release.yml)
and then follow the instructions of the created pull request.

```shell
gh workflow run release.yml -f version=1.2.3
```

0 comments on commit ae1ae30

Please sign in to comment.