v1.2.7 #16
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: 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: Switch to branch HEAD | |
run: git switch - | |
- 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 | |
- name: Commit README | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: README.md version updated to ${VERSION} | |
file_pattern: 'README.md' |