Skip to content

Merge pull request #122 from IZIVIA/feat/add-token-headers #36

Merge pull request #122 from IZIVIA/feat/add-token-headers

Merge pull request #122 from IZIVIA/feat/add-token-headers #36

Workflow file for this run

name: OCPI Publish
on:
push:
tags:
- "R-*"
permissions:
contents: write
jobs:
publish:
concurrency: ocpi-publish
runs-on: ubuntu-latest
steps:
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Checkout IZIVIA OCPI toolkit library code from GH
uses: actions/checkout@v3
- name: Setup gradle action
uses: gradle/[email protected]
with:
gradle-version: wrapper
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
gradle-home-cache-cleanup: true
- name: Publish OCPI toolkit
env:
VERSION: ${{ github.ref }}
SONATYPE_USERNAME: ${{ secrets.DELIVERY_SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.DELIVERY_SONATYPE_PASSWORD }}
GPG_PRIVATE_KEY: ${{ secrets.DELIVERY_GPG_SECRET_KEY }}
GPG_PASSPHRASE: ${{ secrets.DELIVERY_GPG_KEY_PASSPHRASE }}
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
- name: Create a GH release
env:
VERSION: ${{ github.ref_name }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |-
gh release create ${{ github.ref }} \
--generate-notes \
--title "Version ${VERSION#R-}" \
ocpi-toolkit-2.2.1/build/libs/*.jar