Skip to content

chore: Patches/Minor updates #57

chore: Patches/Minor updates

chore: Patches/Minor updates #57

Workflow file for this run

# This file was automatically generated by sbt-github-actions using the
# githubWorkflowGenerate task. You should add and commit this file to
# your git repository. It goes without saying that you shouldn't edit
# this file by hand! Instead, if you wish to make changes, you should
# change your sbt build configuration to revise the workflow description
# to meet your needs, then regenerate this file.
name: Continuous Integration
on:
pull_request:
branches: [ '**', '!update/**', '!pr/**' ]
push:
branches: [ '**', '!update/**', '!pr/**' ]
tags: [ v* ]
env:
GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
concurrency:
group: ${{ github.workflow }} @ ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Test
strategy:
matrix:
os: [ ubuntu-latest ]
scala: [ 3 ]
java: [ graalvm@21 ]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup sbt
uses: sbt/setup-sbt@v1
- name: Setup Java (graalvm@21)
id: setup-java-graalvm-21
if: matrix.java == 'graalvm@21'
uses: actions/setup-java@v4
with:
distribution: graalvm
java-version: 21
cache: sbt
- name: sbt update
if: matrix.java == 'graalvm@21' && steps.setup-java-graalvm-21.outputs.cache-hit == 'false'
run: sbt +update
- name: Test
run: sbt '++ ${{ matrix.scala }}' test
- name: Make target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
run: mkdir -p modules/redis-rediculous/target modules/core-tests/target modules/redis-rediculous-tests/target modules/db-migration/target modules/flags/target modules/http-client/target modules/rabbitmq-fs2-tests/target modules/db-skunk-tests/target modules/rabbitmq-fs2/target modules/db-skunk/target modules/db-migration-tests/target modules/http-client-tests/target modules/db-doobie/target modules/db-doobie-tests/target modules/core/target project/target
- name: Compress target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
run: tar cf targets.tar modules/redis-rediculous/target modules/core-tests/target modules/redis-rediculous-tests/target modules/db-migration/target modules/flags/target modules/http-client/target modules/rabbitmq-fs2-tests/target modules/db-skunk-tests/target modules/rabbitmq-fs2/target modules/db-skunk/target modules/db-migration-tests/target modules/http-client-tests/target modules/db-doobie/target modules/db-doobie-tests/target modules/core/target project/target
- name: Upload target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
uses: actions/upload-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}
path: targets.tar
publish:
name: Publish Artifacts
needs: [ prepare-release ]
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
strategy:
matrix:
os: [ ubuntu-latest ]
java: [ graalvm@21 ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup sbt
uses: sbt/setup-sbt@v1
- name: Setup Java (graalvm@21)
id: setup-java-graalvm-21
if: matrix.java == 'graalvm@21'
uses: actions/setup-java@v4
with:
distribution: graalvm
java-version: 21
cache: sbt
- name: sbt update
if: matrix.java == 'graalvm@21' && steps.setup-java-graalvm-21.outputs.cache-hit == 'false'
run: sbt +update
- name: Download target directories (3)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3
- name: Inflate target directories (3)
run: |
tar xf targets.tar
rm targets.tar
- name: Login to Github registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.CI_BOT_USERNAME }}
password: ${{ secrets.CI_BOT_TOKEN }}
- name: Publish
run: sbt publish
dependency-submission:
name: Submit Dependencies
if: github.event.repository.fork == false && github.event_name != 'pull_request'
strategy:
matrix:
os: [ ubuntu-22.04 ]
java: [ graalvm@21 ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup sbt
uses: sbt/setup-sbt@v1
- name: Setup Java (graalvm@21)
id: setup-java-graalvm-21
if: matrix.java == 'graalvm@21'
uses: actions/setup-java@v4
with:
distribution: graalvm
java-version: 21
cache: sbt
- name: sbt update
if: matrix.java == 'graalvm@21' && steps.setup-java-graalvm-21.outputs.cache-hit == 'false'
run: sbt +update
- name: Submit Dependencies
uses: scalacenter/sbt-dependency-submission@v2
with:
modules-ignore: pillars-docs_3
configs-ignore: test scala-tool scala-doc-tool test-internal
validate-steward:
name: Validate Steward Config
strategy:
matrix:
os: [ ubuntu-22.04 ]
java: [ temurin@11 ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (fast)
uses: actions/checkout@v4
- name: Setup Java (temurin@11)
id: setup-java-temurin-11
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- uses: coursier/setup-action@v1
with:
apps: scala-steward
- run: scala-steward validate-repo-config .scala-steward.conf
prepare-release:
name: 👷 Prepare release
needs: [ build ]
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/main'))
strategy:
matrix:
os: [ ubuntu-latest ]
scala: [ 2.13 ]
java: [ temurin@11 ]
runs-on: ${{ matrix.os }}
permissions:
actions: write
checks: write
contents: write
deployments: write
id-token: none
issues: write
packages: write
pages: write
pull-requests: write
repository-projects: write
security-events: write
statuses: write
env:
DTC_HEADLESS: true
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get previous tag
id: previousTag
if: startsWith(github.ref, 'refs/tags/v')
run: |
name=$(git --no-pager tag --sort=creatordate --merged ${{ github.ref_name }} | tail -2 | head -1)
ref_name="${{ github.ref_name }}"
prefix="prepare-"
next_version=${ref_name/#$prefix}
echo "previousTag=$name"
echo "previousTag=$name" >> $GITHUB_ENV
echo "nextTag=$next_version"
echo "nextTag=$next_version" >> $GITHUB_ENV
- name: Update CHANGELOG
id: changelog
if: startsWith(github.ref, 'refs/tags/v')
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
fromTag: ${{ github.ref_name }}
toTag: ${{ env.previousTag }}
writeToFile: true
- name: Commit CHANGELOG.md
if: startsWith(github.ref, 'refs/tags/v')
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'docs: update CHANGELOG.md for ${{ env.nextTag }} [skip ci]'
branch: main
file_pattern: CHANGELOG.md docToolchainConfig.groovy
- name: Create version tag
if: startsWith(github.ref, 'refs/tags/v')
uses: rickstaa/action-create-tag@v1
with:
tag: ${{ github.ref_name }}
message: Release ${{ github.ref_name }}
force_push_tag: true
- name: Create release
if: startsWith(github.ref, 'refs/tags/v')
uses: ncipollo/[email protected]
with:
body: ${{ steps.changelog.outputs.changes }}
name: ${{ github.ref_name }}
tag: ${{ github.ref_name }}
draft: false
makeLatest: true
allowUpdates: true
token: ${{ github.token }}