Compare commits
	
		
			No commits in common. "ceb8a8bc8e81c0cf8f54c325a3949d054dbeb228" and "8a5a2b85cfeecb4d03c7ef1e914a2702d132e3ba" have entirely different histories.
		
	
	
		
			ceb8a8bc8e
			...
			8a5a2b85cf
		
	
		
| @ -14,12 +14,13 @@ steps: | |||||||
|       - pip install -U Commitizen |       - pip install -U Commitizen | ||||||
|       - cz bump --annotated-tag --yes |       - cz bump --annotated-tag --yes | ||||||
|       - git push --follow-tags |       - git push --follow-tags | ||||||
|       - cz changelog $(cz version -p) > CZ_CURRENT_CHANGELOG.md || echo "An error occured while generating the changelog." |       - cz changelog $(cz version -p) > CZ_CURRENT_CHANGELOG.md | ||||||
|     environment: |     environment: | ||||||
|       GIT_USERNAME: |       GIT_USERNAME: | ||||||
|         from_secret: git_username |         from_secret: git_username | ||||||
|       GIT_PASSWORD: |       GIT_PASSWORD: | ||||||
|         from_secret: git_password |         from_secret: git_password | ||||||
|  |     failure: ignore | ||||||
|   - name: publish Docker image |   - name: publish Docker image | ||||||
|     image: plugins/docker |     image: plugins/docker | ||||||
|     settings: |     settings: | ||||||
| @ -41,7 +42,8 @@ steps: | |||||||
|       notes_file: CZ_CURRENT_CHANGELOG.md |       notes_file: CZ_CURRENT_CHANGELOG.md | ||||||
|       owner: innopeak |       owner: innopeak | ||||||
|       repo: drone-gitea-release |       repo: drone-gitea-release | ||||||
|       skip_if_no_notes_file: true |     depends_on: | ||||||
|  |       - bump tag | ||||||
| 
 | 
 | ||||||
| trigger: | trigger: | ||||||
|   branch: |   branch: | ||||||
|  | |||||||
| @ -23,19 +23,18 @@ type Args struct { | |||||||
| 	// Level defines the plugin log level.
 | 	// Level defines the plugin log level.
 | ||||||
| 	Level string `envconfig:"PLUGIN_LOG_LEVEL"` | 	Level string `envconfig:"PLUGIN_LOG_LEVEL"` | ||||||
| 
 | 
 | ||||||
| 	GiteaUrl          string `envconfig:"PLUGIN_GITEA_URL"` | 	GiteaUrl        string `envconfig:"PLUGIN_GITEA_URL"` | ||||||
| 	GiteaUsername     string `envconfig:"PLUGIN_GITEA_USERNAME"` | 	GiteaUsername   string `envconfig:"PLUGIN_GITEA_USERNAME"` | ||||||
| 	GiteaPassword     string `envconfig:"PLUGIN_GITEA_PASSWORD"` | 	GiteaPassword   string `envconfig:"PLUGIN_GITEA_PASSWORD"` | ||||||
| 	Owner             string `envconfig:"PLUGIN_OWNER"` | 	Owner           string `envconfig:"PLUGIN_OWNER"` | ||||||
| 	Repo              string `envconfig:"PLUGIN_REPO"` | 	Repo            string `envconfig:"PLUGIN_REPO"` | ||||||
| 	TitleFormat       string `envconfig:"PLUGIN_TITLE_FORMAT"` | 	TitleFormat     string `envconfig:"PLUGIN_TITLE_FORMAT"` | ||||||
| 	UseLatestGitTag   bool   `envconfig:"PLUGIN_USE_LATEST_GIT_TAG" default:"true"` | 	UseLatestGitTag bool   `envconfig:"PLUGIN_USE_LATEST_GIT_TAG" default:"true"` | ||||||
| 	TagFile           string `envconfig:"PLUGIN_TAG_FILE"` | 	TagFile         string `envconfig:"PLUGIN_TAG_FILE"` | ||||||
| 	TagRegex          string `envconfig:"PLUGIN_TAG_REGEX"` | 	TagRegex        string `envconfig:"PLUGIN_TAG_REGEX"` | ||||||
| 	NotesFile         string `envconfig:"PLUGIN_NOTES_FILE"` | 	NotesFile       string `envconfig:"PLUGIN_NOTES_FILE"` | ||||||
| 	Notes             string `envconfig:"PLUGIN_NOTES"` | 	Notes           string `envconfig:"PLUGIN_NOTES"` | ||||||
| 	IsPrerelease      bool   `envconfig:"PLUGIN_IS_PRERELEASE"` | 	IsPrerelease    bool   `envconfig:"PLUGIN_IS_PRERELEASE"` | ||||||
| 	SkipIfNoNotesFile bool   `envconfig:"PLUGIN_SKIP_IF_NO_NOTES_FILE"` |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| type TitleTemplateCtx struct { | type TitleTemplateCtx struct { | ||||||
| @ -61,10 +60,6 @@ func Exec(ctx context.Context, args Args) error { | |||||||
| 		content, err := os.ReadFile(args.NotesFile) | 		content, err := os.ReadFile(args.NotesFile) | ||||||
| 
 | 
 | ||||||
| 		if err != nil { | 		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) | 			return fmt.Errorf("error reading notes file %w", err) | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user