Skip to content

Commit 9b1f0e0

Browse files
authored
Merge pull request #26 from target/github-releases
First attempt at new workflow structure including publish to GH Releases
2 parents c49667c + 6fd6d0f commit 9b1f0e0

9 files changed

Lines changed: 298 additions & 197 deletions

File tree

.github/workflows/pull_request.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
on: pull_request
2-
name: PullRequest
2+
name: Pull Request
33
jobs:
4-
compileData-validator:
5-
name: compile data-validator
4+
build:
5+
name: Compile, Test, and Package
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@master
9-
- name: compile data-validator
10-
uses: docker://amazoncorretto:8
8+
- name: Checkout
9+
uses: actions/checkout@master
10+
- name: Set up JDK 1.8
11+
uses: actions/setup-java@v1
1112
with:
12-
entrypoint: bin/sbt
13-
args: clean compile test package
13+
java-version: 1.8
14+
- name: Fetch dependencies
15+
run: bin/sbt update
16+
- name: Run tests
17+
run: bin/sbt clean compile test package

.github/workflows/push.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,28 @@
11
on: push
22
name: Push
33
jobs:
4-
compileData-validator:
5-
name: compile data-validator
4+
compile:
5+
name: Compile and Release
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@master
9-
- name: compile data-validator
10-
uses: docker://amazoncorretto:8
8+
- name: Checkout
9+
uses: actions/checkout@master
10+
- name: Set up JDK 1.8
11+
uses: actions/setup-java@v1
1112
with:
12-
entrypoint: bin/sbt
13-
args: clean compile test package
13+
java-version: 1.8
14+
- name: Fetch dependencies
15+
run: bin/sbt update
16+
- name: Run tests
17+
run: bin/sbt clean compile test package
18+
- name: Build a POM
19+
run: bin/sbt makePom
20+
if: startsWith(github.ref, 'refs/tags/')
21+
- name: Release
22+
uses: softprops/action-gh-release@v1
23+
# only on tagged pushes, so releases
24+
if: startsWith(github.ref, 'refs/tags/')
25+
with:
26+
files: target/scala-2.11/data-validator_2.11-*
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
project/target
2-
project/project
2+
project/project/target
33
target
44
!src/main/scala/com/target
55
!src/test/scala/com/target

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
help: ## Prints help for targets with comments
2+
@grep -E '^[a-zA-Z._-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
3+
4+
refresh-sbt: ## Retrieve the latest version of sbt launcher
5+
curl https://raw.githubusercontent.com/paulp/sbt-extras/master/sbt > bin/sbt

0 commit comments

Comments
 (0)