-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
27 lines (22 loc) · 1.07 KB
/
Taskfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
version: 3
dotenv: ['.env', '{{.ENV}}/.env.', '{{.HOME}}/.env']
includes:
template:
dir: template
taskfile: template/Taskfile.yml
github-release:
dir: actions/github-release
taskfile: actions/github-release/Taskfile.yml
tasks:
default:
cmd: task --list
scaffold:
desc: 'Scaffolds a new GitHub Action from the template | Usage: task scaffold -- my-action'
silent: true
cmds:
- echo "Scaffolding a new GitHub Action {{ .CLI_ARGS }} from the template"
- mkdir -p actions/{{ .CLI_ARGS }} && cp -r template/* actions/{{ .CLI_ARGS }}
- sed -i '' 's#module github.com/thoughtgears/github-actions/template#module github.com/thoughtgears/github-actions/actions/{{ .CLI_ARGS }}#' actions/{{ .CLI_ARGS }}/go.mod
- find actions/{{ .CLI_ARGS }} -name '*.go' -exec sed -i '' 's#github.com/thoughtgears/github-actions/template/generator#github.com/thoughtgears/github-actions/actions/{{ .CLI_ARGS }}/generator#g' {} +
- sed -i '' 's/template/{{ .CLI_ARGS }}/' actions/{{ .CLI_ARGS }}/Taskfile.yml
- rm -rf actions/{{ .CLI_ARGS }}/bin