Skip to content

Merge pull request #4 from liuyic00/publish-snapshot #3

Merge pull request #4 from liuyic00/publish-snapshot

Merge pull request #4 from liuyic00/publish-snapshot #3

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cleanup
run: sed -i "s/%NAME%/test/g" build.sc
- name: Setup Scala
uses: olafurpg/setup-scala@v10
with:
java-version: adopt@1.8
- name: Setup Mill
uses: jodersky/setup-mill@v0.2.3
with:
mill-version: 0.9.7
- name: Cache Scala
uses: coursier/cache-action@v5
- name: mill Test
run: mill _.compile
- name: SBT Test
run: sbt test
auto-publish-snapshot:
name: auto publish snapshot
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cleanup
run: sed -i "s/%NAME%/test/g" build.sc
- name: Setup Scala
uses: olafurpg/setup-scala@v10
with:
java-version: adopt@1.8
- name: Cache Scala
uses: coursier/cache-action@v5
- name: Setup GPG (for Publish)
uses: olafurpg/setup-gpg@v3
- name: Publish
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 }}