Skip to content

Merge pull request #40 from HCL-TECH-SOFTWARE/light-version-bump #18

Merge pull request #40 from HCL-TECH-SOFTWARE/light-version-bump

Merge pull request #40 from HCL-TECH-SOFTWARE/light-version-bump #18

Workflow file for this run

name: Push Snapshot to Github registry
on:
workflow_dispatch:
push:
branches:
- main
jobs:
publish:
name: Deploy Snapshot to ghcr.io
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- uses: actions/setup-java@v4
with:
java-version: 8
distribution: 'temurin'
- name: Extract Project version
id: project
run: echo "MVN_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Check env variable
run: echo $MVN_VERSION
- run: mvn --no-transfer-progress clean
- run: npm ci
- run: npm run build
- run: npm run test
- name: Publish only Snapshot to GitHub Packages
if: endsWith(env.MVN_VERSION, '-SNAPSHOT')
run: mvn --no-transfer-progress deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}