Merge pull request #57 from GeoWerkstatt/update-samples #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Prerelease | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get next Version | |
id: tag_version | |
uses: mathieudutour/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
release_branches : .* | |
dry_run: true | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 8 | |
distribution: adopt | |
- name: Build jar with Gradle | |
run: ./gradlew -Pversion='${{ steps.tag_version.outputs.new_version }}-SNAPSHOT' jar | |
- name: Publish to GitHub Maven with Gradle | |
run: ./gradlew -Pversion='${{ steps.tag_version.outputs.new_version }}-SNAPSHOT' publishGeowerkstattCustomFunctionsPublicationToGitHubPackagesRepository | |
env: | |
ORG_GRADLE_PROJECT_GITHUB_ACTOR: ${{ github.actor }} | |
ORG_GRADLE_PROJECT_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
ORG_GRADLE_PROJECT_SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | |
- name: Publish to OSSRH Maven with Gradle | |
run: ./gradlew -Pversion='${{ steps.tag_version.outputs.new_version }}-SNAPSHOT' publishToSonatype | |
env: | |
ORG_GRADLE_PROJECT_OSSRH_USER: ${{ secrets.OSSRH_USER }} | |
ORG_GRADLE_PROJECT_OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
ORG_GRADLE_PROJECT_SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | |
- uses: ncipollo/[email protected] | |
with: | |
artifacts: "build/libs/*.jar" | |
allowUpdates: true | |
name: ${{ steps.tag_version.outputs.new_tag }}-SNAPSHOT | |
tag: ${{ steps.tag_version.outputs.new_tag }}-SNAPSHOT-${{ github.run_id }} | |
commit: ${{ github.sha }} | |
body: ${{ steps.tag_version.outputs.changelog }} | |
prerelease: true | |
token: ${{ secrets.GITHUB_TOKEN }} |