Skip to content

Introduce a custom GH action to publish a new release only on git tag… #1964

Introduce a custom GH action to publish a new release only on git tag…

Introduce a custom GH action to publish a new release only on git tag… #1964

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
scala:
- 2.13.14
steps:
- uses: actions/checkout@v4
- uses: coursier/cache-action@v6
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "oracle"
cache: "sbt"
- name: Check formatting
run: sbt scalafmtCheckAll
- name: Run tests ${{ matrix.scala }}
if: success()
run: sbt ++${{ matrix.scala }} clean coverage test docs/mdoc versionPolicyCheck
- name: Report test coverage
if: success() && github.repository == 'evolution-gaming/kafka-flow'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: sbt ++${{ matrix.scala }} coverageReport coverageAggregate coveralls
- name: Publish documentation / Setup Node
if: success()
uses: actions/setup-node@v3
with:
node-version: '12.x'
- name: Publish documentation / Get yarn cache
if: success()
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Publish documentation / Cache dependencies
if: success()
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-website-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-website-
- name: Publish documentation / Install dependencies
if: success()
working-directory: ./website
run: yarn install --frozen-lockfile
- name: Publish documentation / Build site
if: success()
working-directory: ./website
run: yarn build
- name: Publish documentation / Deploy
if: success() && github.ref == 'refs/heads/master' && github.repository == 'evolution-gaming/kafka-flow'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/build/kafka-flow
- name: Slack Notification
uses: homoluctus/slatify@master
if: failure() && github.ref == 'refs/heads/master' && github.repository == 'evolution-gaming/kafka-flow'
with:
type: ${{ job.status }}
job_name: Build
url: ${{ secrets.SLACK_WEBHOOK }}