Skip to content

fix: dev publishing pipeline #6

fix: dev publishing pipeline

fix: dev publishing pipeline #6

Workflow file for this run

name: Publish Snapshot to GitHub Packages
on:
push:
branches:
- dev
jobs:
snapshot:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
cache: maven
server-id: github
server-username: GITHUB_ACTOR
server-password: GITHUB_TOKEN
- name: Set snapshot version
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
if [[ ! "$VERSION" == *"-SNAPSHOT" ]]; then
mvn versions:set -DnewVersion="${VERSION}-SNAPSHOT" -DgenerateBackupPoms=false
fi
- name: Build, test and publish to GitHub Packages
run: mvn -B clean deploy -Dmaven.resolver.transport=wagon
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}