Skip to content

Commit

Permalink
Workflow update (#33)
Browse files Browse the repository at this point in the history
* workflow update

* workflow update

* remove cache from release
  • Loading branch information
bischoffz committed Feb 4, 2024
1 parent 7f4e975 commit 18f3799
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,43 @@
# separate terms of service, privacy policy, and support
# documentation.

name: Development Build Pre Maven Central
name: Taskit Development Build

on:
push:
branches: [ "dev" ]
paths:
- '**.xml'
- '**.java'
pull_request:
branches: [ "dev" ]
branches-ignore: ["main"]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Taskit
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Get Util Version
run: |
echo "util_version=v$(mvn help:evaluate -Dexpression=util.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV"
- name: Checkout Util
uses: actions/checkout@v4
with:
repository: HHS/ASPR-ms-util
path: util
ref: ${{ (endsWith(env.util_version, 'SNAPSHOT') && 'dev') || env.util_version }}

- name: Build Util
run: mvn clean install -DskipTests --file util/pom.xml
- name: Build Taskit
run: mvn clean install --file pom.xml
run: mvn clean package --file pom.xml

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
# - name: Update dependency graph
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# separate terms of service, privacy policy, and support
# documentation.

name: Create Taskit Release
name: Taskit Release Build

on:
push:
Expand All @@ -21,30 +21,38 @@ jobs:
contents: write
steps:
- name: Checkout Taskit
uses: actions/checkout@v3
- name: Checkout Util
uses: actions/checkout@v3
with:
repository: HHS/ASPR-ms-util
path: util
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Get Util Version
run: |
echo "util_version=v$(mvn help:evaluate -Dexpression=util.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV"
- name: Checkout Util
uses: actions/checkout@v4
with:
repository: HHS/ASPR-ms-util
path: util
ref: ${{ (endsWith(env.util_version, 'SNAPSHOT') && 'dev') || env.util_version }}

- name: Build Util
run: mvn clean install -DskipTests --file util/pom.xml
- name: Build Taskit
run: mvn clean install -Prelease --file pom.xml
- name: Get Version

- name: Get Taskit Version
run: |
echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV"
- name: Make Release
uses: ncipollo/release-action@v1
- name: Make Taskit Release
uses: ncipollo/[email protected]
with:
artifacts: "core/target/core-${{ env.version }}.jar,core/target/core-${{ env.version }}-sources.jar,core/target/core-${{ env.version }}-javadoc.jar,
protobuf/target/protobuf-${{ env.version }}.jar,protobuf/target/protobuf-${{ env.version }}-sources.jar,protobuf/target/protobuf-${{ env.version }}-javadoc.jar"
artifacts: "core/target/core-${{ env.version }}*.jar,protobuf/target/protobuf-${{ env.version }}*.jar"
prerelease: ${{ endsWith(env.version, '-SNAPSHOT') || contains(env.version, '-RC') }}
name: "v${{ env.version }}"
tag: "v${{ env.version }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
# separate terms of service, privacy policy, and support
# documentation.

name: Pull Request for Main Build
name: Taskit Release Pull Request Build

on:
on:
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:
main-build:
Expand All @@ -19,18 +19,25 @@ jobs:
contents: write
steps:
- name: Checkout Taskit
uses: actions/checkout@v3
- name: Checkout Util
uses: actions/checkout@v3
with:
repository: HHS/ASPR-ms-util
path: util
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Get Util Version
run: |
echo "util_version=v$(mvn help:evaluate -Dexpression=util.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV"
- name: Checkout Util
uses: actions/checkout@v4
with:
repository: HHS/ASPR-ms-util
path: util
ref: ${{ (endsWith(env.util_version, 'SNAPSHOT') && 'dev') || env.util_version }}

- name: Build Util
run: mvn clean install -DskipTests --file util/pom.xml
- name: Build Taskit
Expand Down

0 comments on commit 18f3799

Please sign in to comment.