-
Notifications
You must be signed in to change notification settings - Fork 1
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
f02666d
commit c620451
Showing
8 changed files
with
161 additions
and
46 deletions.
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
/env/ | ||
/.qlot | ||
/.DS_Store | ||
*.fasl |
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
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,69 @@ | ||
(uiop:define-package #:40ants-ci/jobs/autotag | ||
(:use #:cl) | ||
(:import-from #:40ants-ci/steps/sh | ||
#:sh) | ||
(:import-from #:40ants-ci/jobs/job) | ||
(:import-from #:40ants-ci/utils | ||
#:current-system-name) | ||
(:import-from #:40ants-ci/steps/action | ||
#:action) | ||
(:export #:autotag)) | ||
(in-package 40ants-ci/jobs/autotag) | ||
|
||
(defparameter *default-filename* "ChangeLog.md") | ||
|
||
(defparameter *default-regex* "^## (?<version>\\d+\\.\\d+\\.\\d+.*?)( |\\n).*$") | ||
|
||
(defparameter *default-tag-prefix* "v") | ||
|
||
(defparameter *default-token-pattern* "${{ secrets.DEPLOY_TRIGGER_TOKEN }}") | ||
|
||
|
||
(defclass autotag (40ants-ci/jobs/job:job) | ||
((filename :initarg :filename | ||
:initform *default-filename* | ||
:type string | ||
:documentation "File where to search for version numbers." | ||
:reader filename) | ||
(regex :initarg :regex | ||
:initform *default-regex* | ||
:type string | ||
:documentation "Regexp used to extract version numbers." | ||
:reader regex) | ||
(tag-prefix :initarg :tag-prefix | ||
:initform *default-tag-prefix* | ||
:type string | ||
:documentation "Tag prefix." | ||
:reader tag-prefix) | ||
(token-pattern :initarg :token-pattern | ||
:initform *default-token-pattern* | ||
:type string | ||
:documentation "Auth token pattern." | ||
:reader token-pattern))) | ||
|
||
|
||
(defun autotag (&key (filename *default-filename*) | ||
(regex *default-regex*) | ||
(tag-prefix *default-tag-prefix*) | ||
(token-pattern *default-token-pattern*)) | ||
"Creates a job which will run autotagger to create a new git tag for release." | ||
(make-instance 'autotag | ||
:filename filename | ||
:regex regex | ||
:tag-prefix tag-prefix | ||
:token-pattern token-pattern)) | ||
|
||
|
||
(defmethod 40ants-ci/jobs/job:steps ((job autotag)) | ||
(append (list | ||
(action "Checkout Code" | ||
"actions/checkout@v3")) | ||
(list | ||
(action "Create release tag" | ||
"butlerlogic/action-autotag@8bc1ad456dcdee34e8c6ffbce991cc31793578c2" | ||
:root (filename job) | ||
:regex_pattern (regex job) | ||
:tag_prefix (tag-prefix job) | ||
:env (list :github_token | ||
(token-pattern job)))) | ||
(call-next-method))) |
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
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