Fix some typos, make CompatHelper a default plugin

This commit is contained in:
Chris de Graaf 2019-12-17 13:21:03 +07:00
parent 428ab6966f
commit cd204640d3
No known key found for this signature in database
GPG Key ID: 150FFDD9B0073C7B
9 changed files with 87 additions and 7 deletions

View File

@ -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).

View File

@ -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)),
)

View File

@ -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.

View File

@ -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", "")

View 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 }}

View 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 }}

View 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 }}

View 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 }}

View File

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