Skip to content

Commit

Permalink
Prepare for first release (#99)
Browse files Browse the repository at this point in the history
* Prepare for first release

* Fix typo
  • Loading branch information
sloede authored Sep 1, 2023
1 parent 734c787 commit 09aa0a8
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: TagBot
on:
issue_comment:
types:
- created
workflow_dispatch:
inputs:
lookback:
default: 3
permissions:
actions: read
checks: read
contents: write
deployments: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
# Edit the following line to reflect the actual name of the GitHub Secret containing your private key
ssh: ${{ secrets.DOCUMENTER_KEY }}
4 changes: 4 additions & 0 deletions LibTrixi.jl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ julia> trixi_finalize_simulation(handle) # do some cleanup and show timers
────────────────────────────────────────────────────────────────────────────────────
```

## Documentation
For more information on LibTrixi.jl, please refer to the
[main documentation](https://trixi-framework.github.io/libtrixi) of libtrixi.

## Authors
For author information, see the
[Authors section](https://github.com/trixi-framework/libtrixi#authors) of the main
Expand Down
1 change: 1 addition & 0 deletions Project.toml
3 changes: 2 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ makedocs(
# Explicitly specify documentation structure
pages = [
"Home" => "index.md",
"Developers" => "developers.md",
"Troubleshooting" => "troubleshooting.md",
"Reference" => [
"C/Fortran" => "reference-c-fortran.md",
"Julia" => "reference-julia.md",
],
"Troubleshooting" => "troubleshooting.md",
"License" => "license.md"
],
strict = true # to make the GitHub action fail when doctests fail, see https://github.com/neuropsychology/Psycho.jl/issues/34
Expand Down
46 changes: 46 additions & 0 deletions docs/src/developers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Developers

## Release management

We manage releases through the tools provided by the Julia community for creating and
publishing new Julia package releases. Specifically, that means
* we set the libtrixi version in
[`LibTrixi.jl/Project.toml`](https://github.com/trixi-framework/libtrixi/blob/main/LibTrixi.jl/Project.toml),
* we use the [Julia Registrator app](https://github.com/JuliaRegistries/Registrator.jl)
for GitHub to register new versions of the Julia package LibTrixi.jl, and
* we rely on the Julia [TagBot](https://github.com/JuliaRegistries/TagBot)
to create associacted tags and GitHub releases once the Julia package is registered.

To support the ability to have TagBot create top-level releases even though the Julia
package LibTrixi.jl lives in a subdirectory, we have symlinked `LibTrixi.jl/Project.toml` to
the repository root.

### Creating a new release
To create a new libtrixi release, follow these steps:
1. Ensure that all tests have passed for the current commit in `main` and that coverage is
OK (>95%).
2. Bump the version in
[`LibTrixi.jl/Project.toml`](https://github.com/trixi-framework/libtrixi/blob/main/LibTrixi.jl/Project.toml)
to the next release version, following [semantic versioning](https://semver.org/). For
example, if the current release is `v0.1.0`, the next release with breaking changes would
be `v0.2.0`, while the next non-breaking release would be `v0.1.1`. Commit this change to `main`.
3. Go to the [latest commit in `main`](https://github.com/trixi-framework/libtrixi/commit/HEAD)
on the GitHub website. This should be the commit where you just updated the version.
Scroll down and submit the following comment
```
@JuliaRegistrator register subdir=LibTrixi.jl
```
This will prompt the [Julia Registrator app](https://github.com/JuliaRegistries/Registrator.jl/)
to create a new release of the Julia package LibTrixi.jl. If there are no issues found
that would prevent auto-merging the version update PR in the Julia General registry
(e.g., if you did not skip a version number), the new version will become active after
about 15 minutes. See the full set of rules
[here](https://github.com/JuliaRegistries/Registrator.jl/).
4. The Julia Registrator app is chatty and will let you know if your registration request
meets all criteria for an auto-merge. Once this is the case, bump the version in
[`LibTrixi.jl/Project.toml`](https://github.com/trixi-framework/libtrixi/blob/main/LibTrixi.jl/Project.toml)
again and set it to the next development version. We do this to prevent confusion about
whether the current state of the repository is identical to the latest release or not.
The next development version is obtained by increasing the *patch* number and appending
`-pre`. For example, if you just released version `v0.1.1`, the next development version
would be `v0.1.2-pre`.

2 comments on commit 09aa0a8

@benegee
Copy link
Collaborator

@benegee benegee commented on 09aa0a8 Sep 1, 2023

Choose a reason for hiding this comment

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

@JuliaRegistrator register subdir=LibTrixi.jl

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/90629

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a LibTrixi.jl-v0.1.0 -m "<description of version>" 09aa0a8767fff13f8fcdd12cb4280b0346aed256
git push origin LibTrixi.jl-v0.1.0

Please sign in to comment.