Skip to content

Commit

Permalink
Deploy to Maven (delta-io#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Murray committed Nov 3, 2020
1 parent 0dc4eaf commit 7c465c2
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- master
- branch-0.6
pull_request:

jobs:
java:
Expand All @@ -14,6 +13,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: olafurpg/setup-scala@v5
- name: Cache local sbt repository
uses: actions/cache@v2
Expand All @@ -26,3 +29,12 @@ jobs:
run: sbt test publishM2
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Push with maven
run: |
export VERSION=`cat version.sbt|awk '{print $5}'|sed 's/"//g'`
# maven doesn't like pushing from local repository so we copy before pushing
cp /home/runner/.m2/repository/io/delta/delta-core_2.12/$VERSION/delta-core_2.12-$VERSION.* .
mvn -B deploy:deploy-file -DpomFile=delta-core_2.12-$VERSION.pom -DrepositoryId=github -Dfile=delta-core_2.12-$VERSION.jar -Durl=https://maven.pkg.github.com/projectnessie/delta
env:
GITHUB_TOKEN: ${{ github.token }}

28 changes: 28 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Pull Request CI Test

on:
pull_request:

jobs:
java:
name: Scala/sbt
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: olafurpg/setup-scala@v5
- name: Cache local sbt repository
uses: actions/cache@v2
with:
path: |
~/.ivy2/cache
~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
- name: Build with sbt
run: sbt compile test
env:
GITHUB_TOKEN: ${{ github.token }}

0 comments on commit 7c465c2

Please sign in to comment.