Update sbt to 1.9.7 #1540
Workflow file for this run
This file contains 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: CI | |
on: | |
pull_request: | |
branches: ['**'] | |
push: | |
branches: ['**'] | |
tags: [v*] | |
jobs: | |
ci-2-12: | |
# run on external PRs, but not on internal PRs since those will be run by push to branch | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
runs-on: ubuntu-20.04 | |
env: | |
scala: 2.12 | |
steps: | |
- name: Check-out repository | |
id: repo-checkout | |
uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: 8 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install AWS cli 1 | |
run: | | |
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle-1.27.127.zip" -o "awscliv1.zip" | |
unzip ./awscliv1.zip | |
ls | |
sudo ./awscli-bundle/install -i /usr/local/aws1 -b /usr/local/bin/aws1 | |
- name: Install AWS cli 2 | |
run: | | |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | |
unzip ./awscliv2.zip | |
ls | |
sudo ./aws/install -i /usr/local/aws2 -b /usr/local/bin/aws2 | |
- name: Cache SBT | |
id: cache-sbt | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.sbt | |
~/.ivy2/cache | |
~/.coursier | |
key: ${{ runner.os }}-sbt-${{ env.scala }}-${{ hashFiles('**/build.sbt') }} | |
- name: Run tests | |
id: run-tests | |
run: SCALA_MAJOR_VERSION=${{ env.scala }} sbt "root/testOnly * -- -l org.elasticmq.rest.sqs.Only213" | |
ci-2-13: | |
# run on external PRs, but not on internal PRs since those will be run by push to branch | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
runs-on: ubuntu-20.04 | |
env: | |
scala: 2.13 | |
steps: | |
- name: Check-out repository | |
id: repo-checkout | |
uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: 8 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install AWS cli 1 | |
run: | | |
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle-1.27.127.zip" -o "awscliv1.zip" | |
unzip -qq ./awscliv1.zip | |
sudo ./awscli-bundle/install -i /usr/local/aws1 -b /usr/local/bin/aws1 | |
- name: Install AWS cli 2 | |
run: | | |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | |
unzip -qq ./awscliv2.zip | |
sudo ./aws/install -i /usr/local/aws2 -b /usr/local/bin/aws2 | |
- name: Cache SBT | |
id: cache-sbt | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.sbt | |
~/.ivy2/cache | |
~/.coursier | |
key: ${{ runner.os }}-sbt-${{ env.scala }}-${{ hashFiles('**/build.sbt') }} | |
- name: Run tests | |
id: run-tests | |
run: SCALA_MAJOR_VERSION=${{ env.scala }} sbt root/test | |
ci-docker: | |
# run on external PRs, but not on internal PRs since those will be run by push to branch | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
runs-on: ubuntu-20.04 | |
env: | |
scala: 2.13 | |
steps: | |
- name: Check-out repository | |
id: repo-checkout | |
uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Cache SBT | |
id: cache-sbt | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.sbt | |
~/.ivy2/cache | |
~/.coursier | |
key: ${{ runner.os }}-sbt-${{ env.scala }}-${{ hashFiles('**/build.sbt') }} | |
- name: Compile | |
run: sbt compile | |
- name: Build jvm docker image | |
run: sbt "project server; assembly; Docker / publishLocal" | |
- name: Build native docker image | |
run: sbt "project nativeServer; assembly; GraalVMNativeImage / packageBin; Docker / publishLocal" | |
publish-jar: | |
needs: [ci-2-12, ci-2-13, ci-docker] | |
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: 8 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Cache sbt | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.sbt | |
~/.ivy2/cache | |
~/.coursier | |
key: ${{ runner.os }}-sbt-release-${{ hashFiles('**/build.sbt') }} | |
- name: Publish artifacts | |
run: sbt ci-release | |
env: | |
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
- name: Upload to S3 | |
run: sbt "project server; assembly; s3Upload" | |
env: | |
S3_USER: ${{ secrets.S3_USER }} | |
S3_PASSWORD: ${{ secrets.S3_PASSWORD }} | |
- name: Extract version from commit message | |
run: | | |
version=${GITHUB_REF/refs\/tags\/v/} | |
echo "VERSION=$version" >> $GITHUB_ENV | |
env: | |
COMMIT_MSG: ${{ github.event.head_commit.message }} | |
- name: Publish release notes | |
uses: release-drafter/release-drafter@v5 | |
with: | |
config-name: release-drafter.yml | |
publish: true | |
name: "v${{ env.VERSION }}" | |
tag: "v${{ env.VERSION }}" | |
version: "v${{ env.VERSION }}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
publish-docker: | |
needs: [ci-2-12, ci-2-13, ci-docker] | |
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Cache sbt | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.sbt | |
~/.ivy2/cache | |
~/.coursier | |
key: ${{ runner.os }}-sbt-release-${{ hashFiles('**/build.sbt') }} | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Publish JVM docker image | |
run: sbt "project server; assembly; Docker / publish" | |
- name: Publish JVM native docker image | |
run: sbt "project nativeServer; assembly; GraalVMNativeImage / packageBin; Docker / publish" |