Skip to content

Commit

Permalink
Release 1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
goerz committed Sep 22, 2023
1 parent ab545a6 commit fa929bf
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 3 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,72 @@ jobs:
write(stdout, out)
exit(1)
end'
- name: Version check
run: |
julia -e '
using Pkg
VERSION = VersionNumber(Pkg.TOML.parsefile("Project.toml")["version"])
BRANCH = ENV["GITHUB_REF_NAME"]
if startswith(BRANCH, "release-")
if (length(VERSION.prerelease) == length(VERSION.build))
println("Version $VERSION on release branch OK")
else
@error "Invalid version $VERSION on release branch"
exit(1)
end
elseif BRANCH != "master"
if ("dev" in VERSION.prerelease) || ("dev" in VERSION.build)
println("Version $VERSION OK with dev-suffix on $BRANCH")
else
@error "Invalid version $VERSION on branch: must contain dev suffix"
exit(1)
end
else
println("Version $VERSION OK on $BRANCH")
end
exit(0)'
- name: Changelog check
run: |
julia -e '
using Pkg
using Dates
VERSION = VersionNumber(Pkg.TOML.parsefile("Project.toml")["version"])
BRANCH = ENV["GITHUB_REF_NAME"]
CHANGELOG = read("NEWS.md", String)
TODAY = string(Dates.today())
if ("dev" in VERSION.prerelease) || ("dev" in VERSION.build)
if !contains(CHANGELOG, "## [Unreleased][]")
@error "NEWS.md for dev-version must contain Unreleased heading"
exit(1)
end
end
if startswith(BRANCH, "release-")
if contains(CHANGELOG, "## [Unreleased][]")
@error "NEWS.md for releases must not contain Unreleased heading"
exit(1)
end
release_header = "## [Version $VERSION][$VERSION] - $TODAY"
if !contains(CHANGELOG, release_header)
@error "NEWS.md must contain release header $(repr(release_header))"
exit(1)
end
rx_release_link = Regex(replace("[$VERSION]: https://github.com/JuliaDocs/DocumenterCitations.jl/compare/v(\\d.\\d.\\d)...v$VERSION", "."=>"\\.", "[" => "\\[", "]" => "\\]"))
release_link = match(rx_release_link, CHANGELOG)
if isnothing(release_link)
@error "NEWS.md must contain a link for the release $VERSION with the pattern $(repr(rx_release_link.pattern)) comparing $VERSION with the previous release"
exit(1)
else
previous_version = VersionNumber(release_link.captures[1])
if previous_version >= VERSION
@error "The release link $(repr(release_link.match)) must compare the range from the previous version, not $(previous_version)"
exit(1)
end
end
unreleased_link = "[Unreleased]: https://github.com/JuliaDocs/DocumenterCitations.jl/compare/v$VERSION...HEAD"
if !contains(CHANGELOG, unreleased_link)
@error "NEWS.md must contain link for future unreleased changes $(repr(unreleased_link)) (but no Unreleased header)"
exit(1)
end
end
println("NEWS.md OK")
exit(0)'
5 changes: 3 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [Unreleased][]
## [Version 1.2.1][1.2.1] - 2023-09-22

### Fixed

Expand Down Expand Up @@ -74,7 +74,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* [DocumenterCitations](https://github.com/JuliaDocs/DocumenterCitations.jl) is now hosted under the [JuliaDocs](https://github.com/JuliaDocs) organization.


[Unreleased]: https://github.com/JuliaDocs/DocumenterCitations.jl/compare/v1.2.0...HEAD
[Unreleased]: https://github.com/JuliaDocs/DocumenterCitations.jl/compare/v1.2.1...HEAD
[1.2.1]: https://github.com/JuliaDocs/DocumenterCitations.jl/compare/v1.2.0...v1.2.1
[1.2.0]: https://github.com/JuliaDocs/DocumenterCitations.jl/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/JuliaDocs/DocumenterCitations.jl/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/JuliaDocs/DocumenterCitations.jl/compare/v0.2.12...v1.0.0
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DocumenterCitations"
uuid = "daee34ce-89f3-4625-b898-19384cb65244"
authors = ["Michael Goerz <[email protected]>"]
version = "1.2.1-dev"
version = "1.2.1"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand Down

2 comments on commit fa929bf

@goerz
Copy link
Member Author

@goerz goerz commented on fa929bf Sep 22, 2023

Choose a reason for hiding this comment

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

@JuliaRegistrator register

See NEWS.md for release notes.

@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/92026

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 v1.2.1 -m "<description of version>" fa929bfd79ccd8b482ec9905cbebb49885e70a07
git push origin v1.2.1

Please sign in to comment.