Skip to content

Commit

Permalink
all in one
Browse files Browse the repository at this point in the history
  • Loading branch information
duttonw committed Jun 7, 2024
1 parent 88f6c89 commit eae811e
Showing 1 changed file with 9 additions and 50 deletions.
59 changes: 9 additions & 50 deletions .github/workflows/githubPackage.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Publish NPM Github Package store
name: Publish Maven Github Package store

on:
push:
Expand All @@ -19,54 +19,7 @@ on:
- Yes

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
jdk: [ '21' ]
name: Lint, Test, Build and Deploy on Node ${{ matrix.jdk }}
steps:
- uses: actions/checkout@v4

- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v4
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '${{ matrix.jdk }}'

- name: Cache Maven packages
id: cache-maven
uses: actions/cache@v2
with:
path: ~/.m2/repository
# save-always: true
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}
- name: Get Versions
run: |
echo "Google chrome version"
google-chrome --version
echo "firefox version"
firefox --version
echo "temp folder: ${{ runner.temp }}"
- name: Build with Maven
run: mvn --batch-mode --update-snapshots verify -Djava.io.tmpdir=${{ runner.temp }}
env:
NVD_NIST_APIKEY: ${{ secrets.NVD_NIST_APIKEY}}

- run: mkdir dist && cp target/*.jar dist

- uses: actions/upload-artifact@v4
with:
name: Package
path: dist


publish-gpr:
needs: build
env:
#When run on push tags, force is '', default for workflow_dispatch is No so you can't trigger without a double action
DO_DEPLOYMENT: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.force == 'Yes' }}
Expand All @@ -75,14 +28,18 @@ jobs:
contents: read
packages: write
id-token: write
strategy:
matrix:
jdk: [ '21' ]
name: Lint, Test, Build and Deploy on Node ${{ matrix.jdk }}
steps:
- uses: actions/checkout@v4

- name: Set up JDK 21
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v4
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '21'
java-version: '${{ matrix.jdk }}'

- name: Cache Maven packages
id: cache-maven
Expand All @@ -104,6 +61,8 @@ jobs:
- name: Build with Maven
run: mvn --batch-mode --update-snapshots verify -Djava.io.tmpdir=${{ runner.temp }}
env:
NVD_NIST_APIKEY: ${{ secrets.NVD_NIST_APIKEY}}

- run: mkdir dist && cp target/*.jar dist

Expand Down

0 comments on commit eae811e

Please sign in to comment.