Skip to content

chore: bump sbt-scalafmt from 2.5.0 to 2.5.2 (#280) #540

chore: bump sbt-scalafmt from 2.5.0 to 2.5.2 (#280)

chore: bump sbt-scalafmt from 2.5.0 to 2.5.2 (#280) #540

Workflow file for this run

name: ZIO Selenium Continuous Integration
on:
pull_request:
push:
branches: ["master"]
tags: ["v*.*.*"]
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout current branch
uses: actions/checkout@v2.4.0
- name: Setup Scala and Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Check formatting and linting
run: sbt "-Dfatal-warnings=true" check
test:
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
- name: Checkout current branch
uses: actions/checkout@v2.4.0
- name: Setup Scala and Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Run tests
run: sbt test
- name: Publish coverage to codecov
uses: codecov/codecov-action@v2
publish:
runs-on: ubuntu-20.04
timeout-minutes: 60
needs: [check, test]
if: github.event_name != 'pull_request'
steps:
- name: Checkout current branch
uses: actions/checkout@v2.4.0
with:
fetch-depth: 0
- name: Setup Scala and Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Publish the library
run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
CI_RELEASE: publishSigned
CI_SNAPSHOT_RELEASE: publish
release:
runs-on: ubuntu-20.04
timeout-minutes: 60
needs: [publish]
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout current branch
uses: actions/checkout@v2.4.0
with:
fetch-depth: 0
- name: Set the release version
shell: bash
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV
- name: Create changes
shell: bash
run: touch CHANGES.md
- name: Generate a changelog
uses: orhun/git-cliff-action@v1
id: git-cliff
with:
config: cliff.toml
args: -vv --latest --strip header
env:
OUTPUT: CHANGES.md
- name: Set the release body
id: release
shell: bash
run: |
r=$(cat ${{ steps.git-cliff.outputs.changelog }})
r="${r//'%'/'%25'}" # Multiline escape sequences for %
r="${r//$'\n'/'%0A'}" # Multiline escape sequences for '\n'
r="${r//$'\r'/'%0D'}" # Multiline escape sequences for '\r'
echo "::set-output name=RELEASE_BODY::$r"
- name: Create the release on github
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release v${{ env.RELEASE_VERSION }}
body: ${{ steps.release.outputs.RELEASE_BODY }}
draft: false
prerelease: false