Skip to content

* remove set-output, use $GITHUB_OUTPUT instead #22

* remove set-output, use $GITHUB_OUTPUT instead

* remove set-output, use $GITHUB_OUTPUT instead #22

Workflow file for this run

name: CI-Snapshot
on:
push:
tags:
- '*-SNAPSHOT'
jobs:
publish-snapshot-sonatype:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: current
- name: Get Project version
id: get_version
run: echo VERSION=$(gradle properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}') >> "$GITHUB_OUTPUT"
- name: Decode
run: |
echo "${{secrets.SIGNING_SECRET_KEY_RING_FILE}}" > /tmp/secring.gpg.b64
base64 -d /tmp/secring.gpg.b64 > /tmp/secring.gpg
- name: Publish Snapshot to Sonatype
uses: gradle/gradle-build-action@v2
with:
gradle-version: current
arguments: assemble publish -Psigning.keyId=${{secrets.SIGNING_KEY_ID}} -Psigning.password=${{secrets.SIGNING_PASSWORD}} -Psigning.secretKeyRingFile=/tmp/secring.gpg -PossrhUsername=${{secrets.SONATYPE_NEXUS_USERNAME}} -PossrhPassword=${{secrets.SONATYPE_NEXUS_PASSWORD}} --stacktrace
- name: Create Release in Github
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.get_version.outputs.VERSION }}
name: ${{ steps.get_version.outputs.VERSION }}
generate_release_notes: true
body: |
Available in Sonatype SNAPSHOTs repository under:
`io.reactiverse:aws-sdk:${{ steps.get_version.outputs.VERSION }}`
draft: true
prerelease: true