feat: start work on v0.6.1 #338
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: Flow | |
on: | |
push: | |
branches: [ master ] | |
tags: [ v* ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Clojure tools | |
uses: DeLaGuardo/[email protected] | |
with: | |
cli: latest | |
- name: Install dependencies | |
run: make prepare | |
- name: Run Tests | |
run: make clj-test java-test | |
coverage: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Clojure tools | |
uses: DeLaGuardo/[email protected] | |
with: | |
cli: latest | |
- name: Coverage | |
run: make coverage | |
- name: Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./target/coverage/codecov.json | |
clojars_push: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Clojure tools | |
uses: DeLaGuardo/[email protected] | |
with: | |
cli: latest | |
- name: Create jar and pom files | |
run: | | |
make prepare jar | |
cp ./target/classes/META-INF/maven/io.github.erdos/stencil-core/pom.xml ./pom.xml | |
cp ./target/stencil-core-*.jar ./stencil-core.jar | |
- name: Release Clojars | |
env: | |
CLOJARS_USERNAME: ${{ secrets.CLOJARS_USER }} | |
CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASS }} | |
run: clojure -X:deploy || echo skipping | |
docker_push: | |
needs: clojars_push | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set env vars | |
run: | | |
IMAGE_ID=ghcr.io/erdos/stencil | |
# Strip git ref prefix from version | |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
# Strip "v" prefix from tag name | |
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') | |
# Use Docker `latest` tag convention | |
[ "$VERSION" == "master" ] && VERSION=latest | |
echo TAG=$IMAGE_ID:$VERSION >> $GITHUB_ENV | |
- name: Log into GitHub Container Registry | |
run: echo "${{ secrets.CR_PAT }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Build GraalVM image | |
working-directory: service | |
run: docker build . --file Dockerfile.graalvm --tag ${{ env.TAG }}-graal | |
- name: Push GraalVM image to GitHub Container Registry | |
run: docker push ${{ env.TAG }}-graal | |
- name: Build image | |
working-directory: service | |
run: docker build . --file Dockerfile --tag ${{ env.TAG }} | |
- name: Push image to GitHub Container Registry | |
run: docker push ${{ env.TAG }} |