Skip to content

1.2.11

1.2.11 #20

Workflow file for this run

name: Build release
on:
release:
types: [published]
jobs:
build_release:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- name: Write release version
run: |
VERSION=${GITHUB_REF_NAME#v}
echo Version: $VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Checkout sources
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Java
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: 22
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build
run: ./gradlew -Pversion=${VERSION} build sourcesJar javadocJar publishToSonatype closeAndReleaseSonatypeStagingRepository
env:
ORG_GRADLE_PROJECT_githubActor: ${{ secrets.GITHUBACTOR }}
ORG_GRADLE_PROJECT_githubToken: ${{ secrets.GITHUBTOKEN }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUser: ${{ secrets.SONATYPE_USER }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
- name: Find branch from tag
id: find-branch
run: |
BRANCH=$(git branch -r --contains ${{ github.event.release.tag_name }} | grep -v '\->' | sed 's/origin\///' | head -n 1)
if [ -z "$BRANCH" ]; then
echo "Branch not found for tag $TAG"
exit 1
fi
echo Branch: $BRANCH
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
- name: Checkout branch HEAD
run: git checkout ${BRANCH}
- name: Update README
run: sed -i 's/com\.xemantic\.kotlin:xemantic-kotlin-swing-dsl-\(core\|test\):[0-9]\+\(\.[0-9]\+\)*\>/com.xemantic.kotlin:xemantic-kotlin-swing-dsl-\1:${{ VERSION }}/g' README.md

Check failure on line 58 in .github/workflows/build-release.yml

View workflow run for this annotation

GitHub Actions / Build release

Invalid workflow file

The workflow is not valid. .github/workflows/build-release.yml (Line: 58, Col: 12): Unrecognized named-value: 'VERSION'. Located at position 1 within expression: VERSION .github/workflows/build-release.yml (Line: 64, Col: 25): Unrecognized named-value: 'VERSION'. Located at position 1 within expression: VERSION
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.WORKFLOW_SECRET }}
commit-message: README.md gradle dependencies update to ${{ VERSION }}
title: PR Action - README.md gradle dependencies update to ${{ VERSION }}