-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github action build_release another attempt to fix release process wi…
…th README.md update
- Loading branch information
Showing
4 changed files
with
28 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,18 +6,22 @@ on: | |
pull_request: | ||
branches-ignore: | ||
- main | ||
|
||
jobs: | ||
build_branch: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/[email protected] | ||
|
||
- 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 build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,13 +9,16 @@ jobs: | |
steps: | ||
- name: Checkout sources | ||
uses: actions/[email protected] | ||
|
||
- 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 build sourcesJar javadocJar publish | ||
env: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,17 +15,21 @@ jobs: | |
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: | ||
|
@@ -35,10 +39,23 @@ jobs: | |
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 checkout $(git branch --contains ${{ github.event.release.tag_name }}) | ||
|
||
- 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 "::set-output name=branch::$BRANCH" | ||
- name: Checkout branch HEAD | ||
run: git checkout ${{ steps.find-branch.outputs.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 | ||
|
||
- name: Commit README | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,8 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- name: Git checkout | ||
uses: actions/[email protected] | ||
with: | ||
# [Required] Access token with `workflow` scope. | ||
token: ${{ secrets.WORKFLOW_SECRET }} | ||
|