Update: add option to hide IPs. #21
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
| # This workflow will build a Java project with Maven | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
| name: CI-Maven-ServletMirror | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up JDK 1.8 | |
| uses: actions/setup-java@v1 | |
| with: | |
| java-version: 1.8 | |
| - name: maven-settings-xml-action | |
| uses: whelk-io/maven-settings-xml-action@v14 | |
| with: | |
| repositories: '[{ "id": "bDev", "url": "https://developer.dev404.net/maven" }]' | |
| - name: Build with Maven | |
| run: mvn -B package --file pom.xml | |
| - name: CreateRelease | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
| with: | |
| tag_name: r1_3_0 | |
| release_name: Release_1.3.0 | |
| body: | | |
| Release - ${{ github.ref }} | |
| Return JSON Response. | |
| draft: false | |
| prerelease: false | |
| - name: Upload Release Asset | |
| id: upload-release-asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | |
| asset_path: target/servletMirror.war | |
| asset_name: servletMirror.war | |
| asset_content_type: application/java-archive | |
| - name: Build project # This would actually build your project, using zip for an example artifact | |
| id: pack-release | |
| run: | | |
| mkdir -p build/servletMirror | |
| cp target/servletMirror.war build/servletMirror/ | |
| cp target/classes/properties.xml build/servletMirror/ | |
| cp target/dependency/jetty-runner.jar build/servletMirror/ | |
| cp jetty-runner.xml build/servletMirror/ | |
| cp *.jks build/servletMirror/ | |
| cp run01.sh build/servletMirror/ | |
| zip -9 -r target/servletMirror.zip build/servletMirror | |
| - name: Upload Release Asset - zip | |
| id: upload-release-asset2 | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: target/servletMirror.zip | |
| asset_name: servletMirror.zip | |
| asset_content_type: application/zip |