Skip to content

Commit

Permalink
fix(workflow): Fix workflow execution
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelsJP committed Aug 31, 2023
1 parent 4d3c5e7 commit 35ba580
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 56 deletions.
56 changes: 0 additions & 56 deletions .github/workflows/jfrog-publish.yml

This file was deleted.

55 changes: 55 additions & 0 deletions .github/workflows/push-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Publish to GitHub Packages
on:
push:
branches:
- 'ors_4.0'
- 'releases/v0.13.24'
release:
types: [ published ]
jobs:
publish:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
- name: Cache Maven artifacts
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache node
uses: actions/cache@v2
with:
path: web-bundle/node
key: ${{ runner.os }}-node-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os}}-node-
- name: Cache node_modules
uses: actions/cache@v2
with:
path: web-bundle/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/pom.xml', '**/package.json') }}
restore-keys: |
${{ runner.os}}-node_modules-
- name: Build and publish package on snapshot
if: github.event_name == 'push' && github.event_name != 'release'
run: |
mvn -B -DskipTests -Pskip-shaded-web-jar -Pskip-tools-jar source:jar deploy
env:
RT_USERNAME: ${{ secrets.RT_USERNAME }}
RT_PASSWORD: ${{ secrets.RT_PASSWORD }}
# Write a task to publish the package to GitHub Packages when a release is published
- name: Build and publish package on release
if: github.event_name == 'release'
run: |
mvn versions:set -DnewVersion=${{ github.event.release.tag_name }} -DgenerateBackupPoms=false
mvn -B -DskipTests -Pskip-shaded-web-jar -Pskip-tools-jar source:jar deploy
env:
RT_USERNAME: ${{ secrets.RT_USERNAME }}
RT_PASSWORD: ${{ secrets.RT_PASSWORD }}
38 changes: 38 additions & 0 deletions .github/workflows/run_maven_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
push:
branches:
- 'ors_4.0'
- 'releases/v4.*'
- 'releases/v0.13.24'
pull_request:
branches:
- 'ors_4.0'
- 'releases/v4.*'
- 'releases/v0.13.24'

jobs:
run_tests:
name: Run unit and integration tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Test, build, run API tests
run: # mvn -B -f pom.xml verify

0 comments on commit 35ba580

Please sign in to comment.