Skip to content

Commit

Permalink
Switch from travis to github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
thesamet committed Jan 31, 2021
1 parent 7c9595a commit 75b6ddc
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 27 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI

on: [push, pull_request]

jobs:
build:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: ["ubuntu-20.04"]

steps:
- uses: actions/checkout@v2
- uses: olafurpg/setup-scala@v10
with:
java-version: 8
- name: Mount caches
uses: actions/cache@v2
with:
path: |
~/.sbt
~/.ivy2/cache
~/.cache/coursier
key: ${{ runner.os }}-sbt-${{ hashFiles('**/*.sbt') }}
- name: Compile and test
run: |
sbt test
shell: bash
- name: Format check
if: ${{ runner.os == 'Linux' }}
run: |
sbt scalafmtCheck test:scalafmtCheck scalafmtSbtCheck
# Single final job for mergify.
ci-passed:
runs-on: ubuntu-latest
needs: build
steps:
- run: ':'
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release

on:
push:
branches: [master]
tags: ["v*"]

jobs:
publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Scala caches
uses: actions/cache@v2
with:
path: |
~/.sbt
~/.ivy2/cache
~/.cache/coursier
key: ${{ runner.os }}-sbt-docs-${{ hashFiles('**/*.sbt') }}
- uses: actions/setup-java@v1
with:
java-version: 8
- uses: olafurpg/setup-gpg@v3
if: startsWith(github.ref, 'refs/tags/v')
- name: "Publish release: ${{github.ref}}"
if: startsWith(github.ref, 'refs/tags/v')
run: PUBLISH_ONLY=${GITHUB_REF%%/*} RELEASE=1 sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
- name: "Publish snapshot: ${{github.ref}}"
if: "!startsWith(github.ref, 'refs/tags/v')"
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 }}
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

9 changes: 0 additions & 9 deletions release.sh

This file was deleted.

0 comments on commit 75b6ddc

Please sign in to comment.