File tree 5 files changed +52
-15
lines changed
5 files changed +52
-15
lines changed Original file line number Diff line number Diff line change 3
3
orb-tools :
circleci/[email protected]
4
4
5
5
workflows :
6
- validate-publish- dev :
6
+ validate-dev :
7
7
jobs :
8
8
- orb-tools/lint
9
9
- orb-tools/publish-dev :
@@ -13,15 +13,21 @@ workflows:
13
13
checkout : true
14
14
requires :
15
15
- orb-tools/lint
16
- tag-triggered-publish :
16
+ draft-release :
17
17
jobs :
18
18
- hold-for-approval :
19
19
filters :
20
20
branches :
21
- ignore : /.*/
22
- tags :
23
- only : /^\d+\.\d+\.\d+$/
21
+ only : /release\/.*/
24
22
type : approval
23
+ - github-release :
24
+ filters :
25
+ branches :
26
+ only : /release\/.*/
27
+ requires :
28
+ - hold-for-approval
29
+ publish :
30
+ jobs :
25
31
- orb-tools/publish :
26
32
orb-ref : buildpacks/pack@$CIRCLE_TAG
27
33
orb-path : orb.yml
@@ -31,6 +37,33 @@ workflows:
31
37
ignore : /.*/
32
38
tags :
33
39
only : /^\d+\.\d+\.\d+$/
34
- requires :
35
- - hold-for-approval
36
40
41
+ jobs :
42
+ github-release :
43
+ machine :
44
+ image : ubuntu-2004:202010-01
45
+ steps :
46
+ - run :
47
+ name : Install generator
48
+ command : gem install github_changelog_generator
49
+ - run :
50
+ name : Install releaser
51
+ command : go get -u github.com/tcnksm/ghr
52
+ - checkout
53
+ - run :
54
+ name : Determine version
55
+ command : |
56
+ [[ $CIRCLE_BRANCH =~ ^release/(.*)$ ]] && echo -n ${BASH_REMATCH[1]} > VERSION || (echo "failed to determine version" && exit 99)
57
+ cat VERSION
58
+ - run :
59
+ name : Generate changelog
60
+ command : |
61
+ github_changelog_generator --user $CIRCLE_PROJECT_USERNAME --project $CIRCLE_PROJECT_REPONAME --token $GITHUB_BOT_PAT --future-release $(cat VERSION) -o CHANGELOG.tmp.md
62
+ # remove footer
63
+ head -n -3 CHANGELOG.tmp.md > CHANGELOG.md
64
+ cat CHANGELOG.md
65
+ - run :
66
+ name : Create GH release
67
+ command : |
68
+ VERSION=$(cat VERSION)
69
+ ghr -draft -t $GITHUB_BOT_PAT -c $CIRCLE_SHA1 -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME -b "$(cat CHANGELOG.md)" -n "pack-orb ${VERSION}" $VERSION
Original file line number Diff line number Diff line change
1
+ unreleased-only=true
2
+ issues=false
3
+ bugs-label=Fixes:
4
+ bug-labels=type/bug
5
+ header-label=## Changelog
6
+ usernames-as-github-logins=true
Original file line number Diff line number Diff line change
1
+ CHANGELOG.md
Original file line number Diff line number Diff line change @@ -12,11 +12,7 @@ See the [documentation on the CircleCI Orb Registry](https://circleci.com/orbs/r
12
12
13
13
## Releasing
14
14
15
- Create a tag a push it:
16
-
17
- ```
18
- $ git tag x.y.z
19
- $ git push --tags
20
- ```
21
-
22
- Check [ CircleCI] ( https://circleci.com/gh/buildpacks/pack-orb ) to manually approve the release workflow.
15
+ 1 . Create a ` release/<#.#.#> ` branch
16
+ - ` <#.#.#> ` will be the version released
17
+ 2 . Check [ CircleCI] ( https://circleci.com/gh/buildpacks/pack-orb ) to manually approve the release workflow.
18
+ 3 . Check [ releases] ( https://github.com/buildpacks/pack-orb/releases ) and publish release draft.
Original file line number Diff line number Diff line change
1
+ 0.2.2
You can’t perform that action at this time.
0 commit comments