Compare commits
2 Commits
8a5a2b85cf
...
ceb8a8bc8e
Author | SHA1 | Date | |
---|---|---|---|
ceb8a8bc8e | |||
3509a5c98f |
@ -14,13 +14,12 @@ steps:
|
||||
- pip install -U Commitizen
|
||||
- cz bump --annotated-tag --yes
|
||||
- git push --follow-tags
|
||||
- cz changelog $(cz version -p) > CZ_CURRENT_CHANGELOG.md
|
||||
- cz changelog $(cz version -p) > CZ_CURRENT_CHANGELOG.md || echo "An error occured while generating the changelog."
|
||||
environment:
|
||||
GIT_USERNAME:
|
||||
from_secret: git_username
|
||||
GIT_PASSWORD:
|
||||
from_secret: git_password
|
||||
failure: ignore
|
||||
- name: publish Docker image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
@ -42,8 +41,7 @@ steps:
|
||||
notes_file: CZ_CURRENT_CHANGELOG.md
|
||||
owner: innopeak
|
||||
repo: drone-gitea-release
|
||||
depends_on:
|
||||
- bump tag
|
||||
skip_if_no_notes_file: true
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
|
@ -35,6 +35,7 @@ type Args struct {
|
||||
NotesFile string `envconfig:"PLUGIN_NOTES_FILE"`
|
||||
Notes string `envconfig:"PLUGIN_NOTES"`
|
||||
IsPrerelease bool `envconfig:"PLUGIN_IS_PRERELEASE"`
|
||||
SkipIfNoNotesFile bool `envconfig:"PLUGIN_SKIP_IF_NO_NOTES_FILE"`
|
||||
}
|
||||
|
||||
type TitleTemplateCtx struct {
|
||||
@ -60,6 +61,10 @@ func Exec(ctx context.Context, args Args) error {
|
||||
content, err := os.ReadFile(args.NotesFile)
|
||||
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) && args.SkipIfNoNotesFile {
|
||||
fmt.Println("No notes file found, skipping release")
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("error reading notes file %w", err)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user