Skip to content

__SEMANTIC RELEASE VERSION UPDATE__ #140

__SEMANTIC RELEASE VERSION UPDATE__

__SEMANTIC RELEASE VERSION UPDATE__ #140

Workflow file for this run

name: Release
on:
push:
branches:
- main
- master
jobs:
tests:
name: Tests
if: "!contains(github.event.head_commit.message, '__SEMANTIC RELEASE VERSION UPDATE__')"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cfengine: ["lucee@5", "adobe@2021", "adobe@2023", "boxlang@be"]
fullNull: ["true", "false"]
steps:
- name: Checkout Repository
uses: actions/[email protected]
- name: Setup Java JDK
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: 11
- name: Set Up CommandBox
uses: elpete/[email protected]
- name: Install CommandBox-BoxLang
run: box install commandbox-boxlang
- name: Install dependencies
run: |
box install
- name: Start server
run: |
if [[ "${{ matrix.cfengine }}" == *"boxlang"* ]] ; then
box server start cfengine=${{ matrix.cfengine }} javaVersion=openjdk21_jdk
box run-script bx-modules:install
box server restart
else
box server start cfengine=${{ matrix.cfengine }}
fi
- name: Run TestBox Tests
env:
FULL_NULL: ${{matrix.fullNull}}
run: box testbox run
release:
name: Semantic Release
if: "!contains(github.event.head_commit.message, '__SEMANTIC RELEASE VERSION UPDATE__')"
needs: tests
runs-on: ubuntu-latest
env:
GA_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
steps:
- name: Checkout Repository
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Java JDK
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: 11
- name: Set Up CommandBox
uses: elpete/[email protected]
- name: Install and Configure Semantic Release
run: |
box install commandbox-semantic-release@^3.0.0
box config set endpoints.forgebox.APIToken=${{ secrets.FORGEBOX_TOKEN }}
box config set modules.commandbox-semantic-release.targetBranch=main
box config set modules.commandbox-semantic-release.plugins='{ "VerifyConditions": "GitHubActionsConditionsVerifier@commandbox-semantic-release", "FetchLastRelease": "ForgeBoxReleaseFetcher@commandbox-semantic-release", "RetrieveCommits": "JGitCommitsRetriever@commandbox-semantic-release", "ParseCommit": "ConventionalChangelogParser@commandbox-semantic-release", "FilterCommits": "DefaultCommitFilterer@commandbox-semantic-release", "AnalyzeCommits": "DefaultCommitAnalyzer@commandbox-semantic-release", "VerifyRelease": "NullReleaseVerifier@commandbox-semantic-release", "GenerateNotes": "GitHubMarkdownNotesGenerator@commandbox-semantic-release", "UpdateChangelog": "FileAppendChangelogUpdater@commandbox-semantic-release", "CommitArtifacts": "GitHubArtifactsCommitter@commandbox-semantic-release", "PublishRelease": "ForgeBoxReleasePublisher@commandbox-semantic-release", "PublicizeRelease": "GitHubReleasePublicizer@commandbox-semantic-release" }'
- name: Run Semantic Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: box semantic-release
- name: Generate API Docs
run: |
box install commandbox-docbox
box run-script generateAPIDocs
- name: Get Current Version
id: current_version
run: echo "version=`cat box.json | jq '.version' -r`" >> $GITHUB_OUTPUT
- name: Upload API Docs to S3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read
env:
AWS_S3_BUCKET: "apidocs.ortussolutions.com"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }}
SOURCE_DIR: ".tmp/apidocs"
DEST_DIR: "${{ github.repository }}/${{ steps.current_version.outputs.version }}"