Skip to content

Commit 42e4c5e

Browse files
Moves publish logic into main build workflow
Signed-off-by: Albert Pastrana <albert.pastrana@intenthq.com>
1 parent eb3a558 commit 42e4c5e

File tree

2 files changed

+20
-24
lines changed

2 files changed

+20
-24
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- main
7+
tags:
8+
- 'v*'
79
pull_request:
810
branches:
911
- main
@@ -13,7 +15,6 @@ on:
1315

1416
jobs:
1517
build:
16-
1718
runs-on: ubuntu-latest
1819

1920
steps:
@@ -27,3 +28,21 @@ jobs:
2728
env:
2829
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
2930
run: sbt test
31+
32+
publish:
33+
runs-on: ubuntu-latest
34+
needs: build
35+
timeout-minutes: 10
36+
if: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')}}
37+
38+
steps:
39+
- uses: actions/checkout@v2
40+
- uses: coursier/cache-action@v3
41+
- name: Set up JDK 1.8
42+
uses: actions/setup-java@v1
43+
with:
44+
java-version: 1.8
45+
- name: Publish library
46+
env:
47+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
48+
run: sbt publish

.github/workflows/publish.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)