Add some TagBot options
This commit is contained in:
parent
f149c5078f
commit
7c5552202c
@ -1,5 +1,11 @@
|
|||||||
"""
|
"""
|
||||||
TagBot(; destination="TagBot.yml", gpgsign=false)
|
TagBot(;
|
||||||
|
destination="TagBot.yml",
|
||||||
|
gpgsign=false,
|
||||||
|
registry=nothing,
|
||||||
|
github_site=nothing,
|
||||||
|
github_api=nothing,
|
||||||
|
)
|
||||||
|
|
||||||
Adds GitHub release support via [TagBot](https://github.com/JuliaRegistries/TagBot).
|
Adds GitHub release support via [TagBot](https://github.com/JuliaRegistries/TagBot).
|
||||||
|
|
||||||
@ -7,13 +13,30 @@ Adds GitHub release support via [TagBot](https://github.com/JuliaRegistries/TagB
|
|||||||
- `destination::AbstractString`: Destination of the worflow file,
|
- `destination::AbstractString`: Destination of the worflow file,
|
||||||
relative to `.github/workflows`.
|
relative to `.github/workflows`.
|
||||||
- `gpgsign::Bool`: Whether or not to enable GPG signing of tags.
|
- `gpgsign::Bool`: Whether or not to enable GPG signing of tags.
|
||||||
|
- `registry::Union{AbstractString, Nothing}`: Custom registry, in the format `owner/repo`.
|
||||||
|
- `github_site::Union{AbstractString, Nothing}`: URL to a self-hosted GitHub instance.
|
||||||
|
- `github_api::Union{AbstractString, Nothing}`: URL to a self-hosted GitHub instance's API.
|
||||||
|
|
||||||
|
!!! note
|
||||||
|
If you set `gpgsign`, you must add the `GPG_KEY` secret to your repository yourself.
|
||||||
"""
|
"""
|
||||||
@with_kw_noshow struct TagBot <: BasicPlugin
|
@with_kw_noshow struct TagBot <: BasicPlugin
|
||||||
destination::String = "TagBot.yml"
|
destination::String = "TagBot.yml"
|
||||||
gpgsign::Bool = false
|
gpgsign::Bool = false
|
||||||
|
registry::Union{String, Nothing} = nothing
|
||||||
|
github_api::Union{String, Nothing} = nothing
|
||||||
|
github_site::Union{String, Nothing} = nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
source(::TagBot) = default_file("github", "workflows", "TagBot.yml")
|
source(::TagBot) = default_file("github", "workflows", "TagBot.yml")
|
||||||
destination(p::TagBot) = joinpath(".github", "workflows", p.destination)
|
destination(p::TagBot) = joinpath(".github", "workflows", p.destination)
|
||||||
tags(::TagBot) = "<<", ">>"
|
tags(::TagBot) = "<<", ">>"
|
||||||
view(p::TagBot, ::Template, ::AbstractString) = Dict("HAS_GPG" => p.gpgsign)
|
|
||||||
|
function view(p::TagBot, ::Template, ::AbstractString)
|
||||||
|
return Dict(
|
||||||
|
"GITHUB_API" => p.github_api,
|
||||||
|
"GITHUB_SITE" => p.github_site,
|
||||||
|
"HAS_GPG" => p.gpgsign,
|
||||||
|
"REGISTRY" => p.registry,
|
||||||
|
)
|
||||||
|
end
|
||||||
|
@ -13,3 +13,12 @@ jobs:
|
|||||||
<<#HAS_GPG>>
|
<<#HAS_GPG>>
|
||||||
gpg-key: ${{ secrets.GPG_KEY }}
|
gpg-key: ${{ secrets.GPG_KEY }}
|
||||||
<</HAS_GPG>>
|
<</HAS_GPG>>
|
||||||
|
<<#REGISTRY>>
|
||||||
|
registry: <<®ISTRY>>
|
||||||
|
<</REGISTRY>>
|
||||||
|
<<#GITHUB_SITE>>
|
||||||
|
github-site: <<&GITHUB_SITE>>
|
||||||
|
<</GITHUB_SITE>>
|
||||||
|
<<#GITHUB_API>>
|
||||||
|
github-api: <<&GITHUB_API>>
|
||||||
|
<</GITHUB_API>>
|
||||||
|
@ -11,3 +11,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
gpg-key: ${{ secrets.GPG_KEY }}
|
gpg-key: ${{ secrets.GPG_KEY }}
|
||||||
|
registry: Foo/Bar
|
||||||
|
github-site: https://example.com
|
||||||
|
github-api: https://api.example.com
|
||||||
|
@ -76,7 +76,12 @@ end
|
|||||||
License(; name="ISC"),
|
License(; name="ISC"),
|
||||||
ProjectFile(; version=v"1"),
|
ProjectFile(; version=v"1"),
|
||||||
Readme(; inline_badges=true),
|
Readme(; inline_badges=true),
|
||||||
TagBot(; gpgsign=true),
|
TagBot(;
|
||||||
|
gpgsign=true,
|
||||||
|
registry="Foo/Bar",
|
||||||
|
github_api="https://api.example.com",
|
||||||
|
github_site="https://example.com",
|
||||||
|
),
|
||||||
Tests(; project=true),
|
Tests(; project=true),
|
||||||
TravisCI(;
|
TravisCI(;
|
||||||
coverage=false,
|
coverage=false,
|
||||||
|
@ -49,6 +49,9 @@ const LICENSES_DIR = joinpath(TEMPLATES_DIR, "licenses")
|
|||||||
TagBot:
|
TagBot:
|
||||||
destination: "TagBot.yml"
|
destination: "TagBot.yml"
|
||||||
gpgsign: false
|
gpgsign: false
|
||||||
|
registry: nothing
|
||||||
|
github_api: nothing
|
||||||
|
github_site: nothing
|
||||||
Tests:
|
Tests:
|
||||||
file: "$(joinpath(TEMPLATES_DIR, "test", "runtests.jl"))"
|
file: "$(joinpath(TEMPLATES_DIR, "test", "runtests.jl"))"
|
||||||
project: false
|
project: false
|
||||||
|
Loading…
Reference in New Issue
Block a user