Skip to content

Publish Release

Publish Release #6

Workflow file for this run

name: Release
on:
workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
- name: Publish
run: ./gradlew build publishAndReleaseToMavenCentral --no-configuration-cache
- name: Get Release Version
shell: bash
run: |
version=$(./gradlew --no-daemon -q :sqlitecopyopenhelper:properties --property version | grep "^version:" | awk '{printf $2}')
echo "RELEASE_VERSION=$version" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RELEASE_VERSION }}
release_name: v${{ env.RELEASE_VERSION }}
draft: false
prerelease: false