Skip to content

Revert "Sonatype public repo as source repo" #24

Revert "Sonatype public repo as source repo"

Revert "Sonatype public repo as source repo" #24

Workflow file for this run

name: Java CI with Maven
on:
push:
tags: [ "v*" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn clean package -PbuildKar --file pom.xml
- name: version
run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" | tee -a $GITHUB_OUTPUT
id: version
- name: release
if: startsWith(github.ref, 'refs/tags/')
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ github.ref_name }}
tag_name: ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: upload kar artifact
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/nexus-repository-chef-${{ steps.version.outputs.version }}-bundle.kar
asset_name: nexus-repository-chef-${{ steps.version.outputs.version }}-bundle.kar
asset_content_type: application/zip