Fix some typos, make CompatHelper a default plugin
This commit is contained in:
parent
428ab6966f
commit
cd204640d3
@ -29,7 +29,7 @@ Integrates your packages with [GitHub Actions](https://github.com/features/actio
|
||||
|
||||
## Keyword Arguments
|
||||
- `file::AbstractString`: Template file for the workflow file.
|
||||
- `destination::AbstractString`: Destination of the worflow file,
|
||||
- `destination::AbstractString`: Destination of the workflow file,
|
||||
relative to `.github/workflows`.
|
||||
- `linux::Bool`: Whether or not to run builds on Linux.
|
||||
- `osx::Bool`: Whether or not to run builds on OSX (MacOS).
|
||||
|
@ -8,7 +8,7 @@ Integrates your packages with [CompatHelper](https://github.com/bcbi/CompatHelpe
|
||||
|
||||
## Keyword Arguments
|
||||
- `file::AbstractString`: Template file for the workflow file.
|
||||
- `destination::AbstractString`: Destination of the worflow file,
|
||||
- `destination::AbstractString`: Destination of the workflow file,
|
||||
relative to `.github/workflows`.
|
||||
"""
|
||||
@with_kw_noshow struct CompatHelper <: BasicPlugin
|
||||
@ -20,6 +20,6 @@ source(p::CompatHelper) = p.file
|
||||
destination(p::CompatHelper) = joinpath(".github", "workflows", p.destination)
|
||||
tags(::CompatHelper) = "<<", ">>"
|
||||
|
||||
function view(p::CompatHelper, t::Template, ::AbstractString)
|
||||
return Dict("VERSION" => format_version(max(v"1.2", t.julia)))
|
||||
end
|
||||
view(p::CompatHelper, t::Template, ::AbstractString) = Dict(
|
||||
"VERSION" => format_version(max(v"1.2", t.julia)),
|
||||
)
|
||||
|
@ -4,7 +4,7 @@
|
||||
Adds GitHub release support via [TagBot](https://github.com/JuliaRegistries/TagBot).
|
||||
|
||||
## Keyword Arguments
|
||||
- `destination::AbstractString`: Destination of the worflow file,
|
||||
- `destination::AbstractString`: Destination of the workflow file,
|
||||
relative to `.github/workflows`.
|
||||
- `registry::Union{AbstractString, Nothing}`: Custom registry, in the format `owner/repo`.
|
||||
- `dispatch::Bool`: Whether or not to enable the `dispatch` option.
|
||||
|
@ -1,6 +1,15 @@
|
||||
default_plugins() = [ProjectFile(), SrcDir(), Git(), License(), Readme(), Tests(), TagBot()]
|
||||
default_user() = LibGit2.getconfig("github.user", "")
|
||||
default_version() = VersionNumber(VERSION.major)
|
||||
default_plugins() = [
|
||||
CompatHelper(),
|
||||
ProjectFile(),
|
||||
SrcDir(),
|
||||
Git(),
|
||||
License(),
|
||||
Readme(),
|
||||
Tests(),
|
||||
TagBot(),
|
||||
]
|
||||
|
||||
function default_authors()
|
||||
name = LibGit2.getconfig("user.name", "")
|
||||
|
17
test/fixtures/Basic/.github/workflows/CompatHelper.yml
vendored
Normal file
17
test/fixtures/Basic/.github/workflows/CompatHelper.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
name: CompatHelper
|
||||
on:
|
||||
schedule:
|
||||
- cron: 0 * * * *
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: julia-actions/setup-julia@latest
|
||||
with:
|
||||
version: 1.2
|
||||
- name: Pkg.add("CompatHelper")
|
||||
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
|
||||
- name: CompatHelper.main()
|
||||
run: julia -e 'using CompatHelper; CompatHelper.main()'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
17
test/fixtures/DocumenterGitHubActions/.github/workflows/CompatHelper.yml
vendored
Normal file
17
test/fixtures/DocumenterGitHubActions/.github/workflows/CompatHelper.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
name: CompatHelper
|
||||
on:
|
||||
schedule:
|
||||
- cron: 0 * * * *
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: julia-actions/setup-julia@latest
|
||||
with:
|
||||
version: 1.2
|
||||
- name: Pkg.add("CompatHelper")
|
||||
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
|
||||
- name: CompatHelper.main()
|
||||
run: julia -e 'using CompatHelper; CompatHelper.main()'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
17
test/fixtures/DocumenterTravis/.github/workflows/CompatHelper.yml
vendored
Normal file
17
test/fixtures/DocumenterTravis/.github/workflows/CompatHelper.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
name: CompatHelper
|
||||
on:
|
||||
schedule:
|
||||
- cron: 0 * * * *
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: julia-actions/setup-julia@latest
|
||||
with:
|
||||
version: 1.2
|
||||
- name: Pkg.add("CompatHelper")
|
||||
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
|
||||
- name: CompatHelper.main()
|
||||
run: julia -e 'using CompatHelper; CompatHelper.main()'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
17
test/fixtures/WackyOptions/.github/workflows/CompatHelper.yml
vendored
Normal file
17
test/fixtures/WackyOptions/.github/workflows/CompatHelper.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
name: CompatHelper
|
||||
on:
|
||||
schedule:
|
||||
- cron: 0 * * * *
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: julia-actions/setup-julia@latest
|
||||
with:
|
||||
version: 1.2
|
||||
- name: Pkg.add("CompatHelper")
|
||||
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
|
||||
- name: CompatHelper.main()
|
||||
run: julia -e 'using CompatHelper; CompatHelper.main()'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@ -30,6 +30,9 @@ const LICENSES_DIR = joinpath(TEMPLATES_DIR, "licenses")
|
||||
julia: v"1.0.0"
|
||||
user: "$USER"
|
||||
plugins:
|
||||
CompatHelper:
|
||||
file: "$(joinpath(TEMPLATES_DIR, "github", "workflows", "CompatHelper.yml"))"
|
||||
destination: "CompatHelper.yml"
|
||||
Git:
|
||||
ignore: String[]
|
||||
ssh: false
|
||||
|
Loading…
Reference in New Issue
Block a user