Skip to content

Release v0.7.3

Release v0.7.3 #28

Workflow file for this run

# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
name: Maven Package
on:
workflow_dispatch:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
outputs:
PROJECT_VERSION: ${{ steps.project-version.outputs.PROJECT_VERSION }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Build and Publish to GitHub Packages Apache Maven
run: ./mvnw -B clean package --file pom.xml -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Save project version
id: project-version
run: |
echo "PROJECT_VERSION=$( mvn help:evaluate -Dexpression=project.version -q -DforceStdout )" >> $GITHUB_OUTPUT
- name: Temp. save artifact
uses: actions/upload-artifact@v4
with:
name: zip-archive
path: target/yamles-utils-*.zip
retention-days: 1
if-no-files-found: error
publish:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: zip-archive
path: target/
- name: Login to Github registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ghcr.io/axway-api-management-plus/yamles-utils:${{ needs.build.outputs.PROJECT_VERSION }}