-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
697c8ae
commit 2ce6808
Showing
8 changed files
with
74 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,6 +86,7 @@ ColPracBadge | |
```@docs | ||
Develop | ||
Citation | ||
RegisterAction | ||
``` | ||
|
||
## A More Complicated Example | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ export | |
NoDeploy, | ||
ProjectFile, | ||
Readme, | ||
RegisterAction, | ||
Secret, | ||
SrcDir, | ||
TagBot, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
""" | ||
RegisterAction(; | ||
file="$(contractuser(default_file("github", "workflows", "register.yml")))", | ||
destination="register.yml", | ||
prompt="Version to register or component to bump", | ||
) | ||
Add a GitHub Actions workflow for registering a package with the General registry via workflow dispatch. | ||
See [here](https://github.com/julia-actions/RegisterAction) for more information. | ||
## Keyword Arguments | ||
- `file::AbstractString`: Template file for the workflow file. | ||
- `destination::AbstractString`: Destination of the workflow file, | ||
relative to `.github/workflows`. | ||
- `prompt::AbstractString`: Prompt for workflow dispatch. | ||
""" | ||
@plugin struct RegisterAction <: FilePlugin | ||
file::String = default_file("github", "workflows", "register.yml") | ||
destination::String = "register.yml" | ||
prompt::String = "Version to register or component to bump" | ||
end | ||
|
||
source(p::RegisterAction) = p.file | ||
destination(p::RegisterAction) = joinpath(".github", "workflows", p.destination) | ||
tags(::RegisterAction) = "<<", ">>" | ||
|
||
view(p::RegisterAction, ::Template, ::AbstractString) = Dict("PROMPT" => p.prompt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Register Package | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: <<&PROMPT>> | ||
required: true | ||
jobs: | ||
register: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: julia-actions/RegisterAction@latest | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Register Package | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: Version to register or component to bump | ||
required: true | ||
jobs: | ||
register: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: julia-actions/RegisterAction@latest | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Register Package | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: gimme version | ||
required: true | ||
jobs: | ||
register: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: julia-actions/RegisterAction@latest | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters