Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaTP committed Jan 20, 2024
1 parent 66ed231 commit 0b0a4e8
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 41 deletions.
75 changes: 36 additions & 39 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
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'
workflow_dispatch:
inputs:
release-version:
description: 'Version being released'
required: true
branch:
description: 'Branch to release from'
required: true
default: 'main'

permissions:
contents: write
Expand Down Expand Up @@ -45,41 +43,40 @@ jobs:
- 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: 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: 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}}

# Now should work!
- 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: 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}}
- 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}}
2 changes: 0 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,6 @@
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<!-- DEBUG -->
<keepStagingRepositoryOnCloseRuleFailure>true</keepStagingRepositoryOnCloseRuleFailure>
</configuration>
</plugin>
</plugins>
Expand Down

0 comments on commit 0b0a4e8

Please sign in to comment.