This repository contains a few configurations of GitHub features. For example a Reusing workflows or Starter workflows as GitHub Actions features.
- Single SBT task
- Java/Scala matrix SBT task
- Publishing to Sonatype
- Validate Binary Compatibility
- Mark Pull Request as Ready To Merge
This workflow is used for running a single SBT task. It can to use for running an any BASH script or command, but we don't recommend doing that.
Path: .github/workflows/sbt.yml
Image: Ubuntu 20.04
Uses actions:
Parameters:
Parameter | Since | Required | Default | Description |
---|---|---|---|---|
cmd | 1.0.0 | ❗ | - | Running command |
java | 1.0.0 | ➖ | 8 | AdoptJDK version |
scala | 1.0.0 | ➖ | '' | Scala version |
cache-key | 1.0.0 | ➖ | '' | Key of custom cache |
cache-path | 1.0.0 | ➖ | '' | Path of custom cache |
env | 1.0.0 | ➖ | '' | Custom ENV vars |
How to use:
uses: playframework/.github/.github/workflows/sbt.yml@v1
with:
cmd: sbt "-Dvar1=$VAR_1" "-Dvar2=$VAR_2" ++$SCALA_VERSION test
env: |
VAR_1=value
VAR_2=value
This workflow is used for running an SBT task on matrix of Java/Scala versions.
Path: .github/workflows/sbt-matrix.yml
Image: Ubuntu 20.04
Uses actions:
Parameters:
Parameter | Since | Required | Default | Description |
---|---|---|---|---|
cmd | 1.0.0 | ❗ | - | Running command |
java | 1.0.0 | ❗ | - | AdoptJDK version |
scala | 1.0.0 | ❗ | - | Scala version |
include | 1.0.0 | ➖ | [] | Matrix include's |
exclude | 1.0.0 | ➖ | [] | Matrix exclude's |
cache-key | 1.0.0 | ➖ | '' | Key of custom cache |
cache-path | 1.0.0 | ➖ | '' | Path of custom cache |
env | 1.0.0 | ➖ | '' | Custom ENV vars |
How to use:
uses: playframework/.github/.github/workflows/sbt-matrix.yml@v1
with:
java: >-
[ "11", "8" ]
scala: >-
[ "2.12.15", "2.13.8", "3.0.2" ]
cmd: sbt "-Dvar1=$VAR_1" "-Dvar2=$VAR_2" ++$SCALA_VERSION test
env: |
VAR_1=value
VAR_2=value
This workflow is used for publishing snapshots artifacts to Sonatype Snapshots repository or release artifacts to Maven Central.
Path: .github/workflows/publish.yml
Image: Ubuntu 20.04
Uses actions:
Parameters:
Parameter | Since | Required | Default | Description |
---|---|---|---|---|
java | 1.0.0 | ➖ | 8 | AdoptJDK version |
Secrets:
Secret | Since | Required | Default | Description |
---|---|---|---|---|
username | 1.0.0 | ❗ | - | Sonatype account username |
password | 1.0.0 | ❗ | - | Sonatype account password |
pgp_passphrase | 1.0.0 | ❗ | - | Password for GPG key |
pgp_secret | 1.0.0 | ❗ | - | Base64 of GPG private key |
How to use:
uses: playframework/.github/.github/workflows/publish.yml@v1
secrets:
username: ${{ secrets.SONATYPE_USERNAME }}
password: ${{ secrets.SONATYPE_PASSWORD }}
pgp_passphrase: ${{ secrets.PGP_PASSPHRASE }}
pgp_secret: ${{ secrets.PGP_SECRET }}
This workflow is used for validate binary compatibility the current version.
Path: .github/workflows/binary-check.yml
Image: Ubuntu 20.04
Uses actions:
Parameters:
Parameter | Since | Required | Default | Description |
---|---|---|---|---|
java | 1.0.0 | ➖ | 8 | AdoptJDK version |
How to use:
uses: playframework/.github/.github/workflows/binary-check.yml@v1
This workflow is used for mark pull request as ready to merge and should be last in the workflows chain.
needs
(GA docs) attribute to make this workflow run last.
Path: .github/workflows/rtm.yml
Image: Ubuntu 20.04
No Parameters
How to use:
needs: # Should be latest
- "check-code-style"
- "..."
- "tests"
uses: playframework/.github/.github/workflows/rtm.yml@v1
TODO