Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #116 from xdev-software/develop
Browse files Browse the repository at this point in the history
6.0.2
  • Loading branch information
AB-xdev authored Dec 14, 2023
2 parents d214105 + f3b7130 commit 30401e3
Show file tree
Hide file tree
Showing 983 changed files with 13,591 additions and 18,628 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
9 changes: 5 additions & 4 deletions .github/workflows/checkBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:

strategy:
matrix:
java: [8, 11, 17]
java: [8, 11, 17, 21]
java-package: [jdk]
distribution: [temurin]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
Expand Down Expand Up @@ -53,7 +53,8 @@ jobs:
exit 1
fi
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: jars-java-${{ matrix.java }}
path: target/*.jar
if-no-files-found: error
59 changes: 33 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@ on:
push:
branches: [ master ]

permissions:
contents: write
pull-requests: write

jobs:
check_code: # Validates the code (see develop.yml)
check_code: # Validates the code (see checkBuild.yml)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up JDK 8
uses: actions/setup-java@v2
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
Expand Down Expand Up @@ -44,7 +48,7 @@ jobs:
outputs:
upload_url: ${{ steps.create_draft.outputs.upload_url }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Configure Git
run: |
Expand All @@ -57,7 +61,9 @@ jobs:
- name: Get version
id: version
run: |
echo "::set-output name=release::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "release=$version" >> $GITHUB_OUTPUT
echo "releasenumber=${version//[!0-9]/}" >> $GITHUB_OUTPUT
- name: Commit and Push
run: |
Expand All @@ -69,40 +75,38 @@ jobs:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: shogo82148/actions-create-release@v1
with:
tag_name: v${{ steps.version.outputs.release }}
release_name: v${{ steps.version.outputs.release }}
commitish: master
body: |
## [Changelog](https://github.com/xdev-software/${{ github.event.repository.name }}/blob/develop/CHANGELOG.md#${{ steps.version.outputs.releasenumber }})
See [Changelog#v${{ steps.version.outputs.release }}](https://github.com/xdev-software/${{ github.event.repository.name }}/blob/develop/CHANGELOG.md#${{ steps.version.outputs.releasenumber }}) for more information.
## Installation
Add the following lines to your pom:
```XML
<dependency>
<groupId>com.xdev-software</groupId>
<artifactId>xapi</artifactId>
<artifactId>${{ github.event.repository.name }}</artifactId>
<version>${{ steps.version.outputs.release }}</version>
</dependency>
```
draft: false
prerelease: false
publish_central: # Publish the code to central
runs-on: ubuntu-latest
needs: [prepare_release]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Init Git and pull
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git pull
- name: Set up JDK 8 OSSRH
uses: actions/setup-java@v2
- name: Set up JDK OSSRH
uses: actions/setup-java@v4
with: # running setup-java again overwrites the settings.xml
distribution: 'temurin'
java-version: '8'
Expand All @@ -124,16 +128,16 @@ jobs:
runs-on: ubuntu-latest
needs: [prepare_release]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Init Git and pull
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git pull
- name: Set up JDK 8
uses: actions/setup-java@v2
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
Expand All @@ -142,7 +146,7 @@ jobs:
run: mvn -B project-info-reports:dependencies

- name: Upload licenses - Upload Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dependencies-licenses
path: target/site
Expand Down Expand Up @@ -176,7 +180,7 @@ jobs:
runs-on: ubuntu-latest
needs: [publish_central]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Init Git and pull
run: |
Expand All @@ -194,9 +198,12 @@ jobs:
git push origin
- name: pull-request
uses: repo-sync/pull-request@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
destination_branch: "develop"
pr_title: "Sync back"
pr_body: "An automated PR to sync changes back"
env:
GH_TOKEN: ${{ github.token }}
run: |
gh_pr_up() {
gh pr create "$@" || gh pr edit "$@"
}
gh_pr_up -B "develop" \
--title "Sync back" \
--body "An automated PR to sync changes back"
6 changes: 3 additions & 3 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
publish_central: # Publish the code to central
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up JDK 8 OSSRH
uses: actions/setup-java@v2
- name: Set up JDK OSSRH
uses: actions/setup-java@v4
with: # running setup-java again overwrites the settings.xml
distribution: 'temurin'
java-version: '8'
Expand Down
93 changes: 93 additions & 0 deletions .github/workflows/update-from-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Update from Template

# This workflow keeps the repo up to date with changes from the template repo (REMOTE_URL)
# It duplicates the REMOTE_BRANCH (into UPDATE_BRANCH) and tries to merge it into the
# this repos default branch (which is checked out here)
# Note that this requires a PAT (Personal Access Token) - at best from a servicing account
# Also note that you should have at least once merged the template repo into the current repo manually
# otherwise a "refusing to merge unrelated histories" error might occur.

on:
schedule:
- cron: '55 2 * * 1'
workflow_dispatch:

env:
UPDATE_BRANCH: update-from-template
REMOTE_URL: https://github.com/xdev-software/xdev-swing-framework-template.git
REMOTE_BRANCH: master

permissions:
contents: write
pull-requests: write

jobs:
update:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
# Required because otherwise there are always changes detected when executing diff/rev-list
fetch-depth: 0
# If no PAT is used the following error occurs on a push:
# refusing to allow a GitHub App to create or update workflow `.github/workflows/xxx.yml` without `workflows` permission
token: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }}

- name: Init Git
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
- name: Main workflow
id: main
run: |
echo "Adding remote template-repo"
git remote add template ${{ env.REMOTE_URL }}
echo "Fetching remote template repo"
git fetch template
echo "Deleting local branch that will contain the updates - if present"
git branch -D ${{ env.UPDATE_BRANCH }} || true
echo "Checking if the remote template repo has new commits"
git rev-list ..template/${{ env.REMOTE_BRANCH }}
if [ $(git rev-list --count ..template/${{ env.REMOTE_BRANCH }}) -eq 0 ]; then
echo "There are no commits new commits on the template repo"
echo "Deleting origin branch that contains the updates - if present"
git push -f origin --delete ${{ env.UPDATE_BRANCH }} || true
echo "abort=1" >> $GITHUB_OUTPUT
exit 0
fi
echo "Found new commits on the template repo"
echo "Creating update branch"
git branch ${{ env.UPDATE_BRANCH }} template/${{ env.REMOTE_BRANCH }}
git branch --unset-upstream ${{ env.UPDATE_BRANCH }}
echo "Pushing update branch"
git push -f -u origin ${{ env.UPDATE_BRANCH }}
echo "Getting current branch"
current_branch=$(git branch --show-current)
echo "Current branch is $current_branch"
echo "current_branch=$current_branch" >> $GITHUB_OUTPUT
echo "abort=0" >> $GITHUB_OUTPUT
- name: pull-request
if: steps.main.outputs.abort == 0
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh_pr_up() {
gh pr create -H "${{ env.UPDATE_BRANCH }}" "$@" || (git checkout "${{ env.UPDATE_BRANCH }}" && gh pr edit "$@")
}
gh_pr_up -B "${{ steps.main.outputs.current_branch }}" \
--title "Update from template" \
--body "An automated PR to sync changes from the template into this repo"
91 changes: 83 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,87 @@
# Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar


# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package/Binary Files don't belong into a git repo
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
*.dll
*.exe
*.bin

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*


# bin / compiled stuff
target/
bin/

# IDEA
.idea/

# JRebel
**/resources/rebel.xml
**/resources/rebel-remote.xml

# eclispe stuff for root
/.settings/
/.classpath
/.project


# eclispe stuff for modules
/*/.metadata/
/*/.apt_generated_tests/
/*/.settings/
/*/.classpath
/*/.project
/*/RemoteSystemsTempFiles/

#custom
.flattened-pom.xml
.tern-project

# == IntelliJ ==
*.iml
*.ipr

# Eclispe
.settings
.classpath
.project
dependency-reduced-pom.xml
# Some files are user/installation independent and are used for configuring the IDE
# See also https://stackoverflow.com/a/35279076

.idea/*
!.idea/saveactions_settings.xml
!.idea/checkstyle-idea.xml

!.idea/inspectionProfiles/
.idea/inspectionProfiles/*
!.idea/inspectionProfiles/Project_Default.xml

!.idea/codeStyles/
.idea/codeStyles/*
!.idea/codeStyles/codeStyleConfig.xml
!.idea/codeStyles/Project.xml
Loading

0 comments on commit 30401e3

Please sign in to comment.