Skip to content

Minor updates (#151) #118

Minor updates (#151)

Minor updates (#151) #118

Workflow file for this run

name: Publish
on:
push:
branches: [main]
workflow_dispatch:
jobs:
publish:
name: Release build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11
- name: Get version
id: version
run: |
VERSION=$(./gradlew -q printVersion)
echo "release_tag=$VERSION" >> $GITHUB_OUTPUT
- name: Check for version.gradle.kts diff
id: diff
env:
BASE_SHA: ${{ github.event.before }}
HEAD_SHA: ${{ github.sha }}
run: |
git fetch --depth=1 origin "$BASE_SHA"
if git diff --quiet "$BASE_SHA" "$HEAD_SHA" -- version.gradle.kts; then
echo "diff=0" >> $GITHUB_OUTPUT
else
echo "diff=1" >> $GITHUB_OUTPUT
fi
- name: Clean
if: steps.diff.outputs.diff != 0 || ${{ github.event_name == 'workflow_dispatch' }}

Check warning on line 38 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish

Workflow syntax warning

.github/workflows/publish.yml (Line: 38, Col: 13): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?

Check warning on line 38 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish

Workflow syntax warning

.github/workflows/publish.yml (Line: 38, Col: 13): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?

Check warning on line 38 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish

Workflow syntax warning

.github/workflows/publish.yml (Line: 38, Col: 13): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?
run: ./gradlew clean
- name: Release build
if: steps.diff.outputs.diff != 0 || ${{ github.event_name == 'workflow_dispatch' }}

Check warning on line 42 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish

Workflow syntax warning

.github/workflows/publish.yml (Line: 42, Col: 13): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?

Check warning on line 42 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish

Workflow syntax warning

.github/workflows/publish.yml (Line: 42, Col: 13): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?

Check warning on line 42 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish

Workflow syntax warning

.github/workflows/publish.yml (Line: 42, Col: 13): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?
run: ./gradlew assemble
- name: Source jar
if: steps.diff.outputs.diff != 0 || ${{ github.event_name == 'workflow_dispatch' }}

Check warning on line 46 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish

Workflow syntax warning

.github/workflows/publish.yml (Line: 46, Col: 13): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?

Check warning on line 46 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish

Workflow syntax warning

.github/workflows/publish.yml (Line: 46, Col: 13): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?

Check warning on line 46 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish

Workflow syntax warning

.github/workflows/publish.yml (Line: 46, Col: 13): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?
run: ./gradlew kotlinSourcesJar
- name: Publish
if: steps.diff.outputs.diff != 0 || ${{ github.event_name == 'workflow_dispatch' }}

Check warning on line 50 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish

Workflow syntax warning

.github/workflows/publish.yml (Line: 50, Col: 13): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?

Check warning on line 50 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish

Workflow syntax warning

.github/workflows/publish.yml (Line: 50, Col: 13): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?

Check warning on line 50 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish

Workflow syntax warning

.github/workflows/publish.yml (Line: 50, Col: 13): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?
run: ./gradlew publish
- name: Deploy
if: steps.diff.outputs.diff != 0 || ${{ github.event_name == 'workflow_dispatch' }}

Check warning on line 54 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish

Workflow syntax warning

.github/workflows/publish.yml (Line: 54, Col: 13): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?

Check warning on line 54 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish

Workflow syntax warning

.github/workflows/publish.yml (Line: 54, Col: 13): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?

Check warning on line 54 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish

Workflow syntax warning

.github/workflows/publish.yml (Line: 54, Col: 13): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?
run: ./gradlew jreleaserDeploy
env:
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.JRELEASER_MAVENCENTRAL_USERNAME }}
JRELEASER_MAVENCENTRAL_PASSWORD: ${{ secrets.JRELEASER_MAVENCENTRAL_PASSWORD }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }}
- name: Create release
if: steps.diff.outputs.diff != 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create "${{ steps.version.outputs.release_tag }}" --generate-notes