Skip to content

try another number

try another number #13

Workflow file for this run

name: release
on:
push:
# TODO: revert these changes, just need to publish!
# workflow_dispatch:
# inputs:
# release-version:
# description: 'Version being released'
# required: true
# branch:
# description: 'Branch to release from'
# required: true
# default: 'main'
permissions:
contents: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- id: install-secret-key
name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Compile
run: mvn clean install -DskipTests=true
- name: Setup Git
run: |
git config user.name "Chicory BOT"
git config user.email "[email protected]"
# - name: Set the version
# run: |
# mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${{ github.event.inputs.release-version }}
# git add .
# git commit -m "Release version update ${{ github.event.inputs.release-version }}"
# git push
# git tag ${{ github.event.inputs.release-version }}
# git push origin ${{ github.event.inputs.release-version }}
# env:
# GITHUB_TOKEN: ${{secrets.GH_TOKEN}}
- name: Release to Maven Central
run: mvn --batch-mode clean deploy -Prelease -DskipTests=true -X
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
# - name: Release
# uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
# with:
# tag_name: ${{ github.event.inputs.release-version }}
# token: ${{secrets.GH_TOKEN}}
# - name: Back to Snapshot
# run: |
# mvn versions:set -DgenerateBackupPoms=false -DnewVersion=999-SNAPSHOT
# git add .
# git commit -m "Snapshot version update"
# git push
# env:
# GITHUB_TOKEN: ${{secrets.GH_TOKEN}}