Skip to content

Fix CI pipeline for website and tags #major (#371) #97

Fix CI pipeline for website and tags #major (#371)

Fix CI pipeline for website and tags #major (#371) #97

Workflow file for this run

name: build-main
on:
push:
branches:
- 'main'
paths-ignore:
- '**.md'
- 'website/**'
- 'build-website.yml'
- 'build-branches.yml'
jobs:
build-tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup Scala
uses: olafurpg/setup-scala@v10
with:
java-version: adopt@1.11
- name: Gen cache keys
run: |
md5sum project/build.properties project/plugins.sbt build.sbt > $GITHUB_WORKSPACE/.sbt_cache_key
cat $GITHUB_WORKSPACE/.sbt_cache_key
- name: Check cache
uses: actions/cache@v2.1.1
with:
key: sbt-${{ hashFiles('**/.sbt_cache_key') }}
path: |
~/.ivy2
~/.sbt
~/.cache/coursier
- name: Spin up Dynamo local
run: docker-compose up -d
- name: Test Dynamo connection
run: |
docker ps
docker run --network container:dynamodb-local curlimages/curl:7.73.0 -v --retry 20 --retry-all-errors http://localhost:8000/
- name: Run build and tests
run:
sbt ";scalafmtCheckAll;+compile;+test;+it:test"
tag-release:
concurrency: ci-${{ github.ref }}
needs: build-tests
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # fetch the whole repo history
- name: Setup Scala
uses: olafurpg/setup-scala@v10
with:
java-version: adopt@1.11
- name: Check cache
uses: actions/cache@v2.1.1
with:
key: sbt-${{ hashFiles('**/.sbt_cache_key') }}
path: |
~/.ivy2
~/.sbt
~/.cache/coursier
- name: Bump version and push tag
uses: anothrNick/github-tag-action@1.67.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
RELEASE_BRANCHES: main
DEFAULT_BUMP: patch
- name: Import keys
run: |
touch /tmp/local.pubring.asc
touch /tmp/local.secring.asc
echo $PGP_PUB_RING > /tmp/local.pubring.asc
echo $PGP_SEC_RING > /tmp/local.secring.asc
env:
PGP_PUB_RING: ${{ secrets.PGP_PUB_RING }}
PGP_SEC_RING: ${{ secrets.PGP_SEC_RING }}
- name: Publish
run: |
sbt +releaseEarly -J-Xms3G -J-Xmx6G -J-Xss4m
env:
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
PGP_PASSWORD: ${{ secrets.PGP_PASSWORD }}
- name: Clean up
run: |
rm /tmp/local.pubring.asc
rm /tmp/local.secring.asc