Skip to content

Merge pull request #81 from GIScience/rename_groupid #43

Merge pull request #81 from GIScience/rename_groupid

Merge pull request #81 from GIScience/rename_groupid #43

Workflow file for this run

name: Publish to GitHub Packages
on:
push:
branches:
- 'ors_4.0'
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 }}