fix: ensure that jGit finds the .git directory (#25) #17
Workflow file for this run
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: tag-and-release | |
on: | |
push: | |
tags: | |
- 'v*' | |
env: | |
JAVA_VERSION: '11' | |
JAVA_DISTRO: 'zulu' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
name: Release | |
env: | |
JRELEASER_TWITTER_CONSUMER_KEY: ${{ secrets.JRELEASER_TWITTER_CONSUMER_KEY }} | |
JRELEASER_TWITTER_CONSUMER_SECRET: ${{ secrets.JRELEASER_TWITTER_CONSUMER_SECRET }} | |
JRELEASER_TWITTER_ACCESS_TOKEN: ${{ secrets.JRELEASER_TWITTER_ACCESS_TOKEN }} | |
JRELEASER_TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.JRELEASER_TWITTER_ACCESS_TOKEN_SECRET }} | |
JRELEASER_MASTODON_ACCESS_TOKEN: ${{ secrets.JRELEASER_MASTODON_ACCESS_TOKEN }} | |
JRELEASER_GITHUB_TOKEN: ${{ secrets.JRELEASER_GITHUB_TOKEN }} | |
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }} | |
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }} | |
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }} | |
JRELEASER_NEXUS2_MAVEN_CENTRAL_PASSWORD: ${{ secrets.JRELEASER_NEXUS2_MAVEN_CENTRAL_PASSWORD }} | |
JRELEASER_NEXUS2_USERNAME: ${{ secrets.JRELEASER_NEXUS2_USERNAME }} | |
JRELEASER_VERSION: early-access | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
distribution: ${{ env.JAVA_DISTRO }} | |
cache: maven | |
- name: Install LATEST extension | |
run: ./mvnw install -DskipTests | |
- name: Configure git-versioner Extension | |
run: | | |
mv ./.mvn/extensions.xml.template ./.mvn/extensions.xml | |
- name: Stage Deploy | |
run: ./mvnw deploy -Pdeploy -DskipTests | |
- name: Set Version | |
id: set-version | |
run: | | |
echo "RELEASE_VERSION=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_OUTPUT | |
- name: Print Version | |
run: | | |
echo "Releasing version: ${{steps.set-version.outputs.RELEASE_VERSION}}" | |
- name: Run JReleaser | |
uses: jreleaser/release-action@v2 | |
env: | |
JRELEASER_PROJECT_VERSION: ${{steps.set-version.outputs.RELEASE_VERSION}} | |
with: | |
version: ${{ env.JRELEASER_VERSION }} | |
arguments: full-release | |
- name: JReleaser release output | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: jreleaser-release | |
path: | | |
out/jreleaser/trace.log | |
out/jreleaser/output.properties |