Skip to content

Package and publish #18

Package and publish

Package and publish #18

Workflow file for this run

name: Package and publish
on:
release:
types: [ created ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
server-id: github
settings-path: ${{ github.workspace }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Get next version
uses: reecetech/[email protected]
id: version
with:
scheme: semver
increment: patch
# Setup git config of the GitHub Actions Bot
- name: Setup git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Publish to GitHub Packages
run: |
./gradlew release \
-Prelease.useAutomaticVersion=true \
-Prelease.releaseVersion=${{ steps.version.outputs.current-version }} \
-Prelease.releaseNewVersion="${{ steps.version.outputs.version }}-SNAPSHOT" \
-x preTagCommit -x createReleaseTag -x commitNewVersion
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}