Add a TagBot plugin
This commit is contained in:
parent
a41187be1c
commit
a79c087010
12
.github/workflows/TagBot.yml
vendored
Normal file
12
.github/workflows/TagBot.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
name: TagBot
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: 0 * * * *
|
||||||
|
jobs:
|
||||||
|
TagBot:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: JuliaRegistries/TagBot@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
@ -40,6 +40,7 @@ Tests
|
|||||||
Readme
|
Readme
|
||||||
License
|
License
|
||||||
Git
|
Git
|
||||||
|
TagBot
|
||||||
```
|
```
|
||||||
|
|
||||||
### Continuous Integration (CI)
|
### Continuous Integration (CI)
|
||||||
|
@ -28,6 +28,7 @@ export
|
|||||||
ProjectFile,
|
ProjectFile,
|
||||||
Readme,
|
Readme,
|
||||||
SrcDir,
|
SrcDir,
|
||||||
|
TagBot,
|
||||||
Tests,
|
Tests,
|
||||||
TravisCI
|
TravisCI
|
||||||
|
|
||||||
|
@ -257,6 +257,7 @@ include(joinpath("plugins", "tests.jl"))
|
|||||||
include(joinpath("plugins", "readme.jl"))
|
include(joinpath("plugins", "readme.jl"))
|
||||||
include(joinpath("plugins", "license.jl"))
|
include(joinpath("plugins", "license.jl"))
|
||||||
include(joinpath("plugins", "git.jl"))
|
include(joinpath("plugins", "git.jl"))
|
||||||
|
include(joinpath("plugins", "tagbot.jl"))
|
||||||
include(joinpath("plugins", "develop.jl"))
|
include(joinpath("plugins", "develop.jl"))
|
||||||
include(joinpath("plugins", "coverage.jl"))
|
include(joinpath("plugins", "coverage.jl"))
|
||||||
include(joinpath("plugins", "ci.jl"))
|
include(joinpath("plugins", "ci.jl"))
|
||||||
|
19
src/plugins/tagbot.jl
Normal file
19
src/plugins/tagbot.jl
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
"""
|
||||||
|
TagBot(; destination="TagBot.yml", gpgsign=false)
|
||||||
|
|
||||||
|
Adds GitHub release support via [TagBot](https://github.com/JuliaRegistries/TagBot).
|
||||||
|
|
||||||
|
## Keyword Arguments
|
||||||
|
- `destination::AbstractString`: Destination of the worflow file,
|
||||||
|
relative to `.github/workflows`.
|
||||||
|
- `gpgsign::Bool`: Whether or not to enable GPG signing of tags.
|
||||||
|
"""
|
||||||
|
@with_kw_noshow struct TagBot <: BasicPlugin
|
||||||
|
destination::String = "TagBot.yml"
|
||||||
|
gpgsign::Bool = false
|
||||||
|
end
|
||||||
|
|
||||||
|
source(::TagBot) = default_file("github", "workflows", "TagBot.yml")
|
||||||
|
destination(p::TagBot) = joinpath(".github", "workflows", p.destination)
|
||||||
|
tags(::TagBot) = "<<", ">>"
|
||||||
|
view(p::TagBot, ::Template, ::AbstractString) = Dict("HAS_GPG" => p.gpgsign)
|
@ -1,4 +1,4 @@
|
|||||||
default_plugins() = [ProjectFile(), SrcDir(), Git(), License(), Readme(), Tests()]
|
default_plugins() = [ProjectFile(), SrcDir(), Git(), License(), Readme(), Tests(), TagBot()]
|
||||||
default_user() = LibGit2.getconfig("github.user", "")
|
default_user() = LibGit2.getconfig("github.user", "")
|
||||||
default_version() = VersionNumber(VERSION.major)
|
default_version() = VersionNumber(VERSION.major)
|
||||||
|
|
||||||
|
15
templates/github/workflows/TagBot.yml
Normal file
15
templates/github/workflows/TagBot.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
name: TagBot
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: 0 * * * *
|
||||||
|
jobs:
|
||||||
|
TagBot:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: JuliaRegistries/TagBot@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
<<#HAS_GPG>>
|
||||||
|
gpg-key: ${{ secrets.GPG_KEY }}
|
||||||
|
<</HAS_GPG>>
|
12
test/fixtures/AllPlugins/.github/workflows/TagBot.yml
vendored
Normal file
12
test/fixtures/AllPlugins/.github/workflows/TagBot.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
name: TagBot
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: 0 * * * *
|
||||||
|
jobs:
|
||||||
|
TagBot:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: JuliaRegistries/TagBot@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
12
test/fixtures/Basic/.github/workflows/TagBot.yml
vendored
Normal file
12
test/fixtures/Basic/.github/workflows/TagBot.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
name: TagBot
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: 0 * * * *
|
||||||
|
jobs:
|
||||||
|
TagBot:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: JuliaRegistries/TagBot@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
12
test/fixtures/DocumenterGitHubActions/.github/workflows/TagBot.yml
vendored
Normal file
12
test/fixtures/DocumenterGitHubActions/.github/workflows/TagBot.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
name: TagBot
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: 0 * * * *
|
||||||
|
jobs:
|
||||||
|
TagBot:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: JuliaRegistries/TagBot@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
12
test/fixtures/DocumenterTravis/.github/workflows/TagBot.yml
vendored
Normal file
12
test/fixtures/DocumenterTravis/.github/workflows/TagBot.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
name: TagBot
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: 0 * * * *
|
||||||
|
jobs:
|
||||||
|
TagBot:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: JuliaRegistries/TagBot@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
13
test/fixtures/WackyOptions/.github/workflows/TagBot.yml
vendored
Normal file
13
test/fixtures/WackyOptions/.github/workflows/TagBot.yml
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
name: TagBot
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: 0 * * * *
|
||||||
|
jobs:
|
||||||
|
TagBot:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: JuliaRegistries/TagBot@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
gpg-key: ${{ secrets.GPG_KEY }}
|
@ -76,6 +76,7 @@ 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),
|
||||||
Tests(; project=true),
|
Tests(; project=true),
|
||||||
TravisCI(;
|
TravisCI(;
|
||||||
coverage=false,
|
coverage=false,
|
||||||
|
@ -46,6 +46,9 @@ const LICENSES_DIR = joinpath(TEMPLATES_DIR, "licenses")
|
|||||||
inline_badges: false
|
inline_badges: false
|
||||||
SrcDir:
|
SrcDir:
|
||||||
file: "$(joinpath(TEMPLATES_DIR, "src", "module.jl"))"
|
file: "$(joinpath(TEMPLATES_DIR, "src", "module.jl"))"
|
||||||
|
TagBot:
|
||||||
|
destination: "TagBot.yml"
|
||||||
|
gpgsign: false
|
||||||
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