-
Notifications
You must be signed in to change notification settings - Fork 12
Add support for Github Actions plus cleanup and updates to POM files #975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
cf1bd85
Working version of POM with updated plugin versions
JeremyMcCormick 5dc127e
Add Github actions
JeremyMcCormick bdea10b
Ignore local Maven repo
JeremyMcCormick 5f43ff4
POM cleanup
JeremyMcCormick 65efeca
Add Maven settings with CI deployment credentials
JeremyMcCormick 2409cdd
Add Github site information to POM
JeremyMcCormick 53be78b
Merge pull request #1 from JeremyMcCormick/feature/issue-959/implemen…
JeremyMcCormick 8936b5f
Correct maven-release-plugin version and additional cleanup
JeremyMcCormick ace6174
Merge pull request #2 from JeremyMcCormick/feature/issue-959/implemen…
JeremyMcCormick 17d7a98
Correct maven args command
JeremyMcCormick cd325bf
Merge pull request #3 from JeremyMcCormick/feature/issue-959/implemen…
JeremyMcCormick 4b45268
[hps-release skip] prepare release hps-java-0.0.1
JeremyMcCormick 78f54f9
[hps-release skip] prepare for next development iteration
JeremyMcCormick b962600
[hps-release skip] prepare release hps-java-0.0.1
JeremyMcCormick 230efd2
[hps-release skip] prepare for next development iteration
JeremyMcCormick 5e00749
Disable shade plugin from making dependency reduced pom
JeremyMcCormick 2489c9b
Correct path to bin jar in workflow
JeremyMcCormick c4f4418
Merge pull request #4 from JeremyMcCormick/feature/issue-959/implemen…
JeremyMcCormick f8c60ae
Skip deployment of all modules except distribution
JeremyMcCormick b9d6228
Add back profile for activating default cache dir
JeremyMcCormick 87fc1be
Correct formatting
JeremyMcCormick 24c7b12
Minor formatting changes
JeremyMcCormick 097f93c
Merge pull request #5 from JeremyMcCormick/feature/issue-959/implemen…
JeremyMcCormick 283eacd
[hps-release skip] prepare release hps-java-0.0.1
JeremyMcCormick e88a477
[hps-release skip] prepare for next development iteration
JeremyMcCormick 9886a13
Put online-recon deps in top pom and exclude jdom 1.0 from being used…
JeremyMcCormick ca25647
Add write-all permissions to release workflow
JeremyMcCormick 96a8bc6
[hps-release skip] prepare release hps-java-0.0.1
JeremyMcCormick c7a1ba2
[hps-release skip] prepare for next development iteration
JeremyMcCormick a8099d5
Merge pull request #6 from JeremyMcCormick/feature/issue-959/implemen…
JeremyMcCormick 056a2d5
[hps-release skip] prepare release hps-java-0.0.1
JeremyMcCormick 812b2c3
[hps-release skip] prepare for next development iteration
JeremyMcCormick 356496b
Move versioning of additional dependencies to top pom
JeremyMcCormick 4cd3c97
Add permissions for site workflow
JeremyMcCormick cd2a032
Correct reporting config for current plugin version
JeremyMcCormick 0b9a451
Merge pull request #7 from JeremyMcCormick/feature/issue-959/implemen…
JeremyMcCormick a85d61a
Hack to remove module links from sidebar
JeremyMcCormick 6c4e8ee
More pom changes for site build
JeremyMcCormick aae4dfb
Delete unused module dirs from staging before deploying site
JeremyMcCormick 121ebfb
Correct staging dir
JeremyMcCormick 6182b35
More cleanup of pom for site
JeremyMcCormick 129d1e1
Merge pull request #8 from JeremyMcCormick/feature/issue-959/implemen…
JeremyMcCormick 26df845
Minor cleanup to pom files
JeremyMcCormick c5a85a1
Fix up custom site (Maven seems to ignore this file though)
JeremyMcCormick b701662
Remove shell script
JeremyMcCormick e156858
Ignore user VS Code settings file
JeremyMcCormick 54f920e
Remove comment
JeremyMcCormick 51d37c7
Merge branch 'master' into feature/issue-959/implement-github-actions
JeremyMcCormick 51ee99d
Merge pull request #9 from JeremyMcCormick/feature/issue-959/implemen…
JeremyMcCormick ed88d9b
[hps-release skip] prepare release hps-java-0.0.2
JeremyMcCormick 753d275
[hps-release skip] prepare for next development iteration
JeremyMcCormick c48d026
Build the project to get jars into local Maven cache
JeremyMcCormick a562b4d
Merge pull request #10 from JeremyMcCormick/feature/issue-959/impleme…
JeremyMcCormick e3bd2ea
[hps-release skip] prepare release hps-java-0.0.3
JeremyMcCormick e8692a4
[hps-release skip] prepare for next development iteration
JeremyMcCormick d7d8fb7
Rearrange site directory
JeremyMcCormick 80a451c
Add organization link to pom
JeremyMcCormick 9a9159c
Add boilerplate log4j prop file to get rid of warnings when tests run
JeremyMcCormick c6bd332
Use standard site build now that module issue was solved
JeremyMcCormick b4a8187
Configure pom so site build works correctly
JeremyMcCormick 621ae66
Update the project site
JeremyMcCormick 7b5ff79
Remove report from site
JeremyMcCormick 1c00fe0
Remove surefire report from website for now
JeremyMcCormick b01bb21
Remove surefire report from website for now
JeremyMcCormick 8d831f2
Merge pull request #11 from JeremyMcCormick/feature/issue-959/impleme…
JeremyMcCormick 983859f
[hps-release skip] prepare release hps-java-0.0.4
JeremyMcCormick ce2ada1
[hps-release skip] prepare for next development iteration
JeremyMcCormick ad18c79
[hps-release skip] prepare release hps-java-0.0.2
JeremyMcCormick c1d2c91
Revert "[hps-release skip] prepare release hps-java-0.0.2"
JeremyMcCormick 49ad5dc
[hps-release skip] prepare release hps-java-0.0.6
JeremyMcCormick e5a7765
[hps-release skip] prepare for next development iteration
JeremyMcCormick 3cd321a
Change fork repo to JLab
JeremyMcCormick 27fc56d
Merge pull request #12 from JeremyMcCormick/feature/issue-959/impleme…
JeremyMcCormick c2d2789
Fix website href
JeremyMcCormick d04970e
Update version
JeremyMcCormick e6fb954
Change to old repo for release
JeremyMcCormick 6b8d621
Undo version change
JeremyMcCormick b93da87
Use old dev connection
JeremyMcCormick 9a73a4f
[hps-release skip] prepare release hps-java-0.0.9720232
JeremyMcCormick 8e9e367
[hps-release skip] prepare for next development iteration
JeremyMcCormick 7c53d37
Put jlab refs back
JeremyMcCormick 5a29086
Merge branch 'master' of https://github.com/jeremymccormick/hps-java
JeremyMcCormick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: deploy | ||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - master | ||
| # Ignore release tags | ||
| tags-ignore: | ||
| - hps-java-* | ||
|
|
||
| jobs: | ||
| deploy: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout source code | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Set up JDK 1.8 | ||
| uses: actions/setup-java@v1 | ||
| with: | ||
| java-version: 1.8 | ||
|
|
||
| - name: Deploy Snapshots with Maven | ||
| run: mvn -B deploy -s .maven_settings.xml -DretryFailedDeploymentCount=10 | ||
| env: | ||
| CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }} | ||
| CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }} | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,166 @@ | ||
| name: release | ||
|
|
||
| permissions: write-all | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| branch: | ||
| description: "Branch to use for release" | ||
| required: true | ||
| default: "master" | ||
| release_version: | ||
| description: "Release version" | ||
| required: true | ||
| default: "auto" | ||
| development_version: | ||
| description: "New development version" | ||
| required: true | ||
| default: "auto" | ||
| dry_run: | ||
| description: "Perform a dry run for testing" | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
| skip_tests: | ||
| description: "Skip running the tests" | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
| skip_javadoc: | ||
| description: "Skip javadoc generation" | ||
| required: false | ||
| type: boolean | ||
| default: true | ||
| quiet: | ||
| description: "Quiet output - only show errors" | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
| generate_release_notes: | ||
| description: "Generate release notes" | ||
| required: false | ||
| type: boolean | ||
| default: true | ||
| deploy_site: | ||
| description: "Update the project website" | ||
| required: false | ||
| type: boolean | ||
| default: true | ||
| secrets: | ||
| SSH_PRIVATE_KEY: | ||
| required: true | ||
| CI_DEPLOY_USERNAME: | ||
| required: true | ||
| CI_DEPLOY_PASSWORD: | ||
| required: true | ||
|
|
||
| jobs: | ||
| # TODO: Add test here for a sanity check | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this still an active todo? |
||
| release: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| release_tag: ${{ steps.maven_release_step.outputs.release_tag }} | ||
| steps: | ||
| - name: Check release version | ||
| if: inputs.release_version != 'auto' && inputs.development_version == 'auto' | ||
| run: | | ||
| echo "ERROR: Release version was provided but next development version was set to auto." | ||
| exit 1 | ||
|
|
||
| - name: Checkout source code | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| ref: ${{ inputs.branch }} | ||
|
|
||
| - name: Create Maven args file | ||
| run: | | ||
| touch .maven_args | ||
| echo "MAVEN_ARGS_FILE=.maven_args" >> $GITHUB_ENV | ||
|
|
||
| - name: Set input release version | ||
| if: inputs.release_version != 'auto' | ||
| run: | | ||
| echo -n "-DreleaseVersion=${{ inputs.release_version }}" >> ${{ env.MAVEN_ARGS_FILE }} | ||
| echo "MAVEN_RELEASE_VERSION=${{ inputs.release_version }}" >> $GITHUB_ENV | ||
|
|
||
| - name: Set default input release version | ||
| if: inputs.release_version == 'auto' | ||
| run: echo "MAVEN_RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | sed s/-SNAPSHOT//g)" >> $GITHUB_ENV | ||
|
|
||
| - name: Set input development version | ||
| if: inputs.development_version != 'auto' | ||
| run: | | ||
| if [[ "${{ inputs.development_version}}" != *-SNAPSHOT ]] | ||
| then | ||
| echo "ERROR: Development version must end with -SNAPSHOT." | ||
| exit 1 | ||
| fi | ||
| echo -n " -DdevelopmentVersion=${{ inputs.development_version }}" >> ${{ env.MAVEN_ARGS_FILE }} | ||
| shell: bash | ||
|
|
||
| - uses: webfactory/ssh-agent@v0.7.0 | ||
| with: | ||
| ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
|
|
||
| - name: Set up JDK 1.8 | ||
| uses: actions/setup-java@v1 | ||
| with: | ||
| java-version: 1.8 | ||
|
|
||
| - name: Get email | ||
| id: get_email | ||
| uses: evvanErb/get-github-email-by-username-action@v1.25 | ||
| with: | ||
| github-username: ${{ github.actor }} | ||
|
|
||
| - name: Configure Git user | ||
| run: | | ||
| git config user.email "${{ steps.get_email.outputs.email }}" | ||
| git config user.name "${{ github.actor }}" | ||
| echo "Username: ${{ github.actor }}" | ||
| echo "Email: ${{ steps.get_email.outputs.email }}" | ||
|
|
||
| - name: Set Maven quiet | ||
| if: inputs.quiet | ||
| run: echo -n " -q" >> ${{ env.MAVEN_ARGS_FILE }} | ||
|
|
||
| - name: Set Maven arguments variable | ||
| run: | | ||
| echo "Extra Maven args: $(cat ${{ env.MAVEN_ARGS_FILE }})" | ||
| echo "MAVEN_ARGS=$(cat ${{ env.MAVEN_ARGS_FILE }})" >> $GITHUB_ENV | ||
|
|
||
| - name: Perform Maven release | ||
| id: maven_release_step | ||
| run: | | ||
| mvn release:prepare release:perform \ | ||
| -DdryRun=${{ inputs.dry_run }} \ | ||
| -DskipTests=${{ inputs.skip_tests }} \ | ||
| -Darguments="-DskipTests=${{ inputs.skip_tests }} -Dmaven.javadoc.skip=${{ inputs.skip_javadoc }} \ | ||
| -Dmaven.site.skip=true -Dmaven.site.deploy.skip=true -DgenerateReports=false" \ | ||
| -B -e -s .maven_settings.xml \ | ||
| ${{ env.MAVEN_ARGS }} | ||
| echo "release_tag=${{ github.event.repository.name }}-${{ env.MAVEN_RELEASE_VERSION }}" >> $GITHUB_OUTPUT | ||
| env: | ||
| CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }} | ||
| CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }} | ||
|
|
||
| - name: Make Github release | ||
| id: github_release | ||
| if: ${{ !inputs.dry_run }} | ||
| uses: softprops/action-gh-release@v1 | ||
| with: | ||
| tag_name: ${{ github.event.repository.name }}-${{ env.MAVEN_RELEASE_VERSION }} | ||
| name: ${{ github.event.repository.name }} ${{ env.MAVEN_RELEASE_VERSION }} | ||
| generate_release_notes: ${{ inputs.generate_release_notes }} | ||
| draft: false | ||
| prerelease: false | ||
| files: | | ||
| ./distribution/target/hps-distribution-${{ env.MAVEN_RELEASE_VERSION }}-bin.jar | ||
| site: | ||
| needs: release | ||
| if: ${{ !inputs.dry_run && inputs.deploy_site }} | ||
| uses: JeffersonLab/hps-java/.github/workflows/site.yml@master | ||
| with: | ||
| tag: ${{ needs.release.outputs.release_tag }} | ||
| secrets: inherit | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| name: site | ||
|
|
||
| permissions: | ||
| deployments: write | ||
| pages: write | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| tag: | ||
| description: "Tag to use for site deployment" | ||
| required: true | ||
| type: string | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag: | ||
| description: "Tag to use for site deployment" | ||
| required: true | ||
| type: string | ||
|
|
||
| jobs: | ||
| deploy-site: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout source code | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| ref: ${{ inputs.tag }} | ||
|
|
||
| - name: Validate tag | ||
| run: | | ||
| if [ "$(git name-rev --name-only --tags HEAD)" == "undefined" ]; then | ||
| echo "ERROR: Reference used as input is not a valid tag." | ||
| exit 1 | ||
| fi | ||
|
|
||
| - uses: webfactory/ssh-agent@v0.7.0 | ||
| with: | ||
| ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
|
|
||
| - name: Set up JDK 1.8 | ||
| uses: actions/setup-java@v1 | ||
| with: | ||
| java-version: 1.8 | ||
|
|
||
| - name: Get email | ||
| id: get_email | ||
| uses: evvanErb/get-github-email-by-username-action@v1.25 | ||
| with: | ||
| github-username: ${{ github.actor }} | ||
|
|
||
| - name: Configure Git user | ||
| run: | | ||
| git config --global user.email "${{ steps.get_email.outputs.email }}" | ||
| git config --global user.name "${{ github.actor }}" | ||
| echo "Username: ${{ github.actor }}" | ||
| echo "Email: ${{ steps.get_email.outputs.email }}" | ||
|
|
||
| - name: Build project and run tests | ||
| run: mvn clean install verify | ||
|
|
||
| - name: Build and deploy the site | ||
| run: mvn site site:stage scm-publish:publish-scm -q |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: test | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| branches: [master] | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout source code | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Set up JDK 1.8 | ||
| uses: actions/setup-java@v1 | ||
| with: | ||
| java-version: 1.8 | ||
|
|
||
| - name: Build and run tests | ||
| run: | | ||
| mvn -B install -T4 |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -45,3 +45,9 @@ target/ | |
|
|
||
| # editor swap files | ||
| .*.swp | ||
|
|
||
| # local Maven repository | ||
| .m2repo | ||
|
|
||
| # ignore user VS Code settings | ||
| .vscode | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <settings xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> | ||
| <servers> | ||
| <server> | ||
| <id>lcsim-repo-releases</id> | ||
| <username>${env.CI_DEPLOY_USERNAME}</username> | ||
| <password>${env.CI_DEPLOY_PASSWORD}</password> | ||
| </server> | ||
| <server> | ||
| <id>lcsim-repo-snapshots</id> | ||
| <username>${env.CI_DEPLOY_USERNAME}</username> | ||
| <password>${env.CI_DEPLOY_PASSWORD}</password> | ||
| </server> | ||
| </servers> | ||
| </settings> |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.