Skip to content

Commit

Permalink
test publish
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentlauvlwj committed May 14, 2022
1 parent 1f7027f commit 5c113d1
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 11 deletions.
37 changes: 27 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: build

on:
- push
- pull_request
push:
pull_request:
types: [opened, synchronize, reopened]
release:
types: [published]

jobs:
build:
Expand All @@ -15,12 +20,24 @@ jobs:
distribution: temurin
java-version: 8

- name: Assemble the Project
uses: gradle/gradle-build-action@v2
with:
arguments: assemble
# - name: Assemble the Project
# uses: gradle/gradle-build-action@v2
# with:
# arguments: assemble
#
# - name: Run Tests
# uses: gradle/gradle-build-action@v2
# with:
# arguments: check

- name: Run Tests
uses: gradle/gradle-build-action@v2
with:
arguments: check
- name: Publish Artifacts
run: |
if [ cat("ktorm.version") =~ "SNAPSHOT" ] ; then
echo "Publish snapshot artifacts...'
else
if [ $GITHUB_EVENT_NAME == "release" ] ; then
echo "Publish release artifacts...'
else
echo "Skip release publication because this is not a release event"
fi
fi
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

group = "org.ktorm"
version = "3.5.0-SNAPSHOT"
version = file("ktorm.version").readText()

task("printClasspath") {
doLast {
Expand Down
1 change: 1 addition & 0 deletions ktorm.version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.5.0-SNAPSHOT

0 comments on commit 5c113d1

Please sign in to comment.