fix: Use ColdBox Async manager over built in async loops #80
This file contains hidden or 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
| 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", "adobe@2025", "boxlang@be"] | |
| coldbox: ["coldbox@7", "coldbox@be"] | |
| services: | |
| mysql: | |
| image: mysql:5.7 | |
| env: | |
| MYSQL_RANDOM_ROOT_PASSWORD: yes | |
| MYSQL_USER: quick | |
| MYSQL_PASSWORD: quick | |
| MYSQL_DATABASE: quick | |
| ports: | |
| - 3306 | |
| options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v2 | |
| - name: Setup Java JDK | |
| uses: actions/setup-java@v1.4.3 | |
| with: | |
| java-version: 11 | |
| - name: Set Up CommandBox | |
| uses: Ortus-Solutions/setup-commandbox@v2.0.1 | |
| with: | |
| install: commandbox-boxlang | |
| - name: Install dependencies | |
| run: | | |
| box install | |
| box config set modules.commandbox-dotenv.checkEnvPreServerStart=false | |
| box install ${{ matrix.coldbox }} --noSave | |
| - name: Start server | |
| env: | |
| DB_HOST: localhost | |
| DB_PORT: ${{ job.services.mysql.ports[3306] }} | |
| DB_NAME: quick | |
| DB_USER: quick | |
| DB_PASSWORD: quick | |
| 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 | |
| # Install Adobe 2021 cfpm modules | |
| if [[ "${{ matrix.cfengine }}" == "adobe@2021" ]] ; then | |
| box run-script install:2021 | |
| fi | |
| - name: Run TestBox Tests | |
| env: | |
| DB_HOST: localhost | |
| DB_PORT: ${{ job.services.mysql.ports[3306] }} | |
| DB_NAME: quick | |
| DB_USER: quick | |
| DB_PASSWORD: quick | |
| 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/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Java JDK | |
| uses: actions/setup-java@v1.4.3 | |
| with: | |
| java-version: 11 | |
| - name: Set Up CommandBox | |
| uses: Ortus-Solutions/setup-commandbox@v2.0.1 | |
| with: | |
| install: commandbox-boxlang | |
| - 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": "NullArtifactsCommitter@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: Get Current Version | |
| id: current_version | |
| run: echo "::set-output name=version::`cat box.json | jq '.version' -r`" |