@@ -36,70 +36,70 @@ jobs:
3636 with :
3737 forgeboxAPIKey : ${{ secrets.FORGEBOX_TOKEN }}
3838
39- # - name: "Setup Environment Variables For Build Process"
40- # id: current_version
41- # run: |
42- # echo "VERSION=`cat box.json | jq '.version' -r`" >> $GITHUB_ENV
43- # box package set version=@build.version@+@build.number@
44- # # master or snapshot
45- # echo "Github Ref is $GITHUB_REF"
46- # echo "BRANCH=master" >> $GITHUB_ENV
47- # if [ $GITHUB_REF == 'refs/heads/development' ]
48- # then
49- # echo "BRANCH=development" >> $GITHUB_ENV
50- # fi
51-
52- # - name: Update changelog [unreleased] with latest version
53- # uses: thomaseizinger/keep-a-changelog-new-release@1.3.0
54- # if: env.SNAPSHOT == 'false'
55- # with:
56- # changelogPath: ./changelog.md
57- # tag: v${{ env.VERSION }}
58-
59- # - name: Build ${{ env.MODULE_ID }}
60- # run: |
61- # box install commandbox-docbox
62- # box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ github.run_number }} :branch=${{ env.BRANCH }}
63-
64- # - name: Commit Changelog To Master
65- # uses: EndBug/add-and-commit@v9.1.1
66- # if: env.SNAPSHOT == 'false'
67- # with:
68- # author_name: Github Actions
69- # author_email: info@ortussolutions.com
70- # message: 'Finalized changelog for v${{ env.VERSION }}'
71- # add: changelog.md
72-
73- # - name: Tag Version
74- # uses: rickstaa/action-create-tag@v1.6.1
75- # if: env.SNAPSHOT == 'false'
76- # with:
77- # tag: "v${{ env.VERSION }}"
78- # force_push_tag: true
79- # message: "Latest Release v${{ env.VERSION }}"
80-
81- # - name: Upload Build Artifacts
82- # if: success()
83- # uses: actions/upload-artifact@v3
84- # with:
85- # name: ${{ env.MODULE_ID }}
86- # path: |
87- # .artifacts/**/*
88- # changelog.md
89-
90- # - name: Publish To ForgeBox
91- # run: |
92- # cd .tmp/${{ env.MODULE_ID }} && box forgebox publish --force
93-
94- # - name: Create Github Release
95- # uses: taiki-e/create-gh-release-action@v1.6.2
96- # continue-on-error: true
97- # if: env.SNAPSHOT == 'false'
98- # with:
99- # title: ${{ env.VERSION }}
100- # changelog: changelog.md
101- # token: ${{ secrets.GITHUB_TOKEN }}
102- # ref: refs/tags/v${{ env.VERSION }}
39+ - name : " Setup Environment Variables For Build Process"
40+ id : current_version
41+ run : |
42+ echo "VERSION=`cat box.json | jq '.version' -r`" >> $GITHUB_ENV
43+ box package set version=@build.version@+@build.number@
44+ # master or snapshot
45+ echo "Github Ref is $GITHUB_REF"
46+ echo "BRANCH=master" >> $GITHUB_ENV
47+ if [ $GITHUB_REF == 'refs/heads/development' ]
48+ then
49+ echo "BRANCH=development" >> $GITHUB_ENV
50+ fi
51+
52+ - name : Update changelog [unreleased] with latest version
53+ uses : thomaseizinger/keep-a-changelog-new-release@1.3.0
54+ if : env.SNAPSHOT == 'false'
55+ with :
56+ changelogPath : ./changelog.md
57+ tag : v${{ env.VERSION }}
58+
59+ - name : Build ${{ env.MODULE_ID }}
60+ run : |
61+ box install commandbox-docbox
62+ box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ github.run_number }} :branch=${{ env.BRANCH }}
63+
64+ - name : Commit Changelog To Master
65+ uses : EndBug/add-and-commit@v9.1.1
66+ if : env.SNAPSHOT == 'false'
67+ with :
68+ author_name : Github Actions
69+ author_email : info@ortussolutions.com
70+ message : ' Finalized changelog for v${{ env.VERSION }}'
71+ add : changelog.md
72+
73+ - name : Tag Version
74+ uses : rickstaa/action-create-tag@v1.6.1
75+ if : env.SNAPSHOT == 'false'
76+ with :
77+ tag : " v${{ env.VERSION }}"
78+ force_push_tag : true
79+ message : " Latest Release v${{ env.VERSION }}"
80+
81+ - name : Upload Build Artifacts
82+ if : success()
83+ uses : actions/upload-artifact@v3
84+ with :
85+ name : ${{ env.MODULE_ID }}
86+ path : |
87+ .artifacts/**/*
88+ changelog.md
89+
90+ - name : Publish To ForgeBox
91+ run : |
92+ cd .tmp/${{ env.MODULE_ID }} && box forgebox publish --force
93+
94+ - name : Create Github Release
95+ uses : taiki-e/create-gh-release-action@v1.6.2
96+ continue-on-error : true
97+ if : env.SNAPSHOT == 'false'
98+ with :
99+ title : ${{ env.VERSION }}
100+ changelog : changelog.md
101+ token : ${{ secrets.GITHUB_TOKEN }}
102+ ref : refs/tags/v${{ env.VERSION }}
103103
104104 # #########################################################################################
105105 # Prep Next Release
@@ -116,34 +116,34 @@ jobs:
116116 with :
117117 ref : development
118118
119- # - name: Setup CommandBox
120- # uses: Ortus-Solutions/setup-commandbox@v2.0.1
121- # with:
122- # forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }}
123-
124- # - name: Download build artifacts
125- # uses: actions/download-artifact@v2
126- # with:
127- # name: ${{ env.MODULE_ID }}
128- # path: .tmp
129-
130- # # Copy the changelog to the development branch
131- # - name: Copy Changelog
132- # run: |
133- # cp .tmp/changelog.md changelog.md
134-
135- # # Bump to next version
136- # - name: Bump Version
137- # run: |
138- # box bump --minor --!TagVersion
139-
140- # # Commit it back to development
141- # - name: Commit Version Bump
142- # uses: EndBug/add-and-commit@v9.1.1
143- # with:
144- # author_name: Github Actions
145- # author_email: info@ortussolutions.com
146- # message: 'Version bump'
147- # add: |
148- # box.json
149- # changelog.md
119+ - name : Setup CommandBox
120+ uses : Ortus-Solutions/setup-commandbox@v2.0.1
121+ with :
122+ forgeboxAPIKey : ${{ secrets.FORGEBOX_TOKEN }}
123+
124+ - name : Download build artifacts
125+ uses : actions/download-artifact@v2
126+ with :
127+ name : ${{ env.MODULE_ID }}
128+ path : .tmp
129+
130+ # Copy the changelog to the development branch
131+ - name : Copy Changelog
132+ run : |
133+ cp .tmp/changelog.md changelog.md
134+
135+ # Bump to next version
136+ - name : Bump Version
137+ run : |
138+ box bump --minor --!TagVersion
139+
140+ # Commit it back to development
141+ - name : Commit Version Bump
142+ uses : EndBug/add-and-commit@v9.1.1
143+ with :
144+ author_name : Github Actions
145+ author_email : info@ortussolutions.com
146+ message : ' Version bump'
147+ add : |
148+ box.json
149+ changelog.md
0 commit comments