Skip to content

Commit ebf8715

Browse files
committed
ok, maybe we are done
1 parent c2a9f19 commit ebf8715

File tree

3 files changed

+97
-100
lines changed

3 files changed

+97
-100
lines changed

.github/workflows/release.yml

Lines changed: 96 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818

1919
env:
2020
MODULE_ID: cbvalidation
21+
SNAPSHOT: ${{ inputs.snapshot || false }}
2122

2223
jobs:
2324
##########################################################################################
@@ -36,75 +37,75 @@ jobs:
3637
distribution: "temurin"
3738
java-version: "11"
3839

39-
# - name: Setup CommandBox
40-
# uses: Ortus-Solutions/[email protected]
41-
# with:
42-
# forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }}
43-
44-
# - name: Setup Environment Variables For Build Process
45-
# id: current_version
46-
# run: |
47-
# echo "VERSION=`cat box.json | jq '.version' -r`" >> $GITHUB_ENV
48-
49-
# # master or snapshot
50-
# echo "Github Ref is $GITHUB_REF"
51-
# echo "BRANCH=master" >> $GITHUB_ENV
52-
# if [ $GITHUB_REF == 'refs/heads/development' ]
53-
# then
54-
# echo "BRANCH=development" >> $GITHUB_ENV
55-
# fi
56-
57-
# - name: Update changelog [unreleased] with latest version
58-
# uses: thomaseizinger/[email protected]
59-
# if: ${{ !inputs.snapshot }}
60-
# with:
61-
# changelogPath: ./changelog.md
62-
# tag: v${{ env.VERSION }}
63-
64-
# - name: Build ${{ env.MODULE_ID }}
65-
# run: |
66-
# box install commandbox-docbox
67-
# box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ github.run_number }} :branch=${{ env.BRANCH }}
68-
69-
# - name: Commit Changelog To Master
70-
# uses: EndBug/[email protected]
71-
# if: ${{ !inputs.snapshot }}
72-
# with:
73-
# author_name: Github Actions
74-
# author_email: [email protected]
75-
# message: 'Finalized changelog for v${{ env.VERSION }}'
76-
# add: changelog.md
77-
78-
# - name: Tag Version
79-
# uses: rickstaa/[email protected]
80-
# if: ${{ !inputs.snapshot }}
81-
# with:
82-
# tag: "v${{ env.VERSION }}"
83-
# force_push_tag: true
84-
# message: "Latest Release v${{ env.VERSION }}"
85-
86-
# - name: Upload Build Artifacts
87-
# if: success()
88-
# uses: actions/upload-artifact@v3
89-
# with:
90-
# name: ${{ env.MODULE_ID }}
91-
# path: |
92-
# .artifacts/**/*
93-
# changelog.md
94-
95-
# - name: Publish To ForgeBox
96-
# run: |
97-
# cd .tmp/${{ env.MODULE_ID }} && box forgebox publish --force
98-
99-
# - name: Create Github Release
100-
# uses: taiki-e/[email protected]
101-
# continue-on-error: true
102-
# if: ${{ !inputs.snapshot }}
103-
# with:
104-
# title: ${{ env.VERSION }}
105-
# changelog: changelog.md
106-
# token: ${{ secrets.GITHUB_TOKEN }}
107-
# ref: refs/tags/v${{ env.VERSION }}
40+
- name: Setup CommandBox
41+
uses: Ortus-Solutions/[email protected]
42+
with:
43+
forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }}
44+
45+
- name: Setup Environment Variables For Build Process
46+
id: current_version
47+
run: |
48+
echo "VERSION=`cat box.json | jq '.version' -r`" >> $GITHUB_ENV
49+
50+
# master or snapshot
51+
echo "Github Ref is $GITHUB_REF"
52+
echo "BRANCH=master" >> $GITHUB_ENV
53+
if [ $GITHUB_REF == 'refs/heads/development' ]
54+
then
55+
echo "BRANCH=development" >> $GITHUB_ENV
56+
fi
57+
58+
- name: Update changelog [unreleased] with latest version
59+
uses: thomaseizinger/[email protected]
60+
if: ${{ !env.SNAPSHOT }}
61+
with:
62+
changelogPath: ./changelog.md
63+
tag: v${{ env.VERSION }}
64+
65+
- name: Build ${{ env.MODULE_ID }}
66+
run: |
67+
box install commandbox-docbox
68+
box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ github.run_number }} :branch=${{ env.BRANCH }}
69+
70+
- name: Commit Changelog To Master
71+
uses: EndBug/[email protected]
72+
if: ${{ !env.SNAPSHOT }}
73+
with:
74+
author_name: Github Actions
75+
author_email: [email protected]
76+
message: 'Finalized changelog for v${{ env.VERSION }}'
77+
add: changelog.md
78+
79+
- name: Tag Version
80+
uses: rickstaa/[email protected]
81+
if: ${{ !env.SNAPSHOT }}
82+
with:
83+
tag: "v${{ env.VERSION }}"
84+
force_push_tag: true
85+
message: "Latest Release v${{ env.VERSION }}"
86+
87+
- name: Upload Build Artifacts
88+
if: success()
89+
uses: actions/upload-artifact@v3
90+
with:
91+
name: ${{ env.MODULE_ID }}
92+
path: |
93+
.artifacts/**/*
94+
changelog.md
95+
96+
- name: Publish To ForgeBox
97+
run: |
98+
cd .tmp/${{ env.MODULE_ID }} && box forgebox publish --force
99+
100+
- name: Create Github Release
101+
uses: taiki-e/[email protected]
102+
continue-on-error: true
103+
if: ${{ !env.SNAPSHOT }}
104+
with:
105+
title: ${{ env.VERSION }}
106+
changelog: changelog.md
107+
token: ${{ secrets.GITHUB_TOKEN }}
108+
ref: refs/tags/v${{ env.VERSION }}
108109

109110
##########################################################################################
110111
# Prep Next Release
@@ -120,29 +121,29 @@ jobs:
120121
with:
121122
ref: development
122123

123-
# - name: Download build artifacts
124-
# uses: actions/download-artifact@v2
125-
# with:
126-
# name: ${{ env.MODULE_ID }}
127-
# path: .tmp
128-
129-
# # Copy the changelog to the development branch
130-
# - name: Copy Changelog
131-
# run: |
132-
# cp .tmp/changelog.md changelog.md
133-
134-
# # Bump to next version
135-
# - name: Bump Version
136-
# run: |
137-
# box bump --minor --!TagVersion
138-
139-
# # Commit it back to development
140-
# - name: Commit Version Bump
141-
# uses: EndBug/[email protected]
142-
# with:
143-
# author_name: Github Actions
144-
# author_email: [email protected]
145-
# message: 'Version bump'
146-
# add: |
147-
# box.json
148-
# changelog.md
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/[email protected]
143+
with:
144+
author_name: Github Actions
145+
author_email: [email protected]
146+
message: 'Version bump'
147+
add: |
148+
box.json
149+
changelog.md

.github/workflows/snapshot.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ jobs:
1515

1616
##########################################################################################
1717
# Format Source Code
18-
# This only fires on `development`, stable releases should not have auto-formatting
1918
##########################################################################################
2019
format:
2120
name: Code Auto-Formatting
22-
needs: [ tests ]
2321
runs-on: ubuntu-20.04
2422
steps:
2523
- uses: actions/checkout@v3
@@ -39,7 +37,7 @@ jobs:
3937
##########################################################################################
4038
release:
4139
uses: ./.github/workflows/release.yml
42-
needs: [ format ]
40+
needs: [ tests, format ]
4341
secrets: inherit
4442
with:
4543
snapshot: true

changelog.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## [Unreleased]
1111

12-
## [4.2.0] - 2023-04-14
13-
1412
### Added
1513

1614
- New github action versions and consolidation of actions

0 commit comments

Comments
 (0)