mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-01-13 13:21:00 +00:00
refactor: let updaters define the files they want to run on (#233)
This change reverses the responsibility for which files the updaters are run on. Now each updater can specify the list of files and wether the files should be created when they do not exist yet. This simplifies the handling of each update in releaserpleaser.go, as we can just iterate over all updaters and call it for each file of that updater. Also update the flags to allow users to easily define which updaters should run.
This commit is contained in:
parent
1e9e0aa5d9
commit
f1aa1a2ef4
20 changed files with 307 additions and 151 deletions
12
action.yml
12
action.yml
|
|
@ -14,15 +14,15 @@ inputs:
|
|||
required: false
|
||||
default: ${{ github.token }}
|
||||
extra-files:
|
||||
description: 'List of files that are scanned for version references.'
|
||||
description: 'List of files that are scanned for version references by the generic updater.'
|
||||
required: false
|
||||
default: ""
|
||||
update-package-json:
|
||||
description: 'Update version field in package.json file.'
|
||||
updaters:
|
||||
description: "List of updaters that are run. Default updaters can be removed by specifying them as -name. Multiple updaters should be concatenated with a comma. Default Updaters: changelog,generic"
|
||||
required: false
|
||||
default: "false"
|
||||
default: ""
|
||||
# Remember to update docs/reference/github-action.md
|
||||
outputs: {}
|
||||
outputs: { }
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: docker://ghcr.io/apricote/releaser-pleaser:v0.6.1 # x-releaser-pleaser-version
|
||||
|
|
@ -31,7 +31,7 @@ runs:
|
|||
- --forge=github
|
||||
- --branch=${{ inputs.branch }}
|
||||
- --extra-files="${{ inputs.extra-files }}"
|
||||
- ${{ inputs.update-package-json == 'true' && '--update-package-json' || '' }}
|
||||
- --updaters="${{ inputs.updaters }}"
|
||||
env:
|
||||
GITHUB_TOKEN: "${{ inputs.token }}"
|
||||
GITHUB_USER: "oauth2"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue