[DNAB-3151] feat: atualiza versão do tomcat #27
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
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Java 1.8 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'corretto' | |
| java-version: '8' | |
| - name: Cache maven | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.m2 | |
| key: gradle-${{ hashFiles('**/BuildConfig.groovy') }} | |
| restore-keys: | | |
| gradle- | |
| - name: Cache grails wrapper | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.grails | |
| key: grails-${{ hashFiles('**/application.properties') }} | |
| - name: Grails test | |
| run: | | |
| ./grailsw refresh-dependencies --non-interactive | |
| ./grailsw test-app --non-interactive | |
| - name: Grails compile | |
| run: ./grailsw compile --non-interactive | |
| - name: Grails package-plugin | |
| run: ./grailsw package-plugin --non-interactive | |
| - name: Grails generate-pom | |
| run: ./grailsw generate-pom --non-interactive | |
| - name: Create Zip and Pom Artifact | |
| run: | | |
| filenameZip=$(find . -name "grails-*.zip" | head -1) | |
| filenameZip=$(basename $filenameZip) | |
| pluginZip=${filenameZip:7} | |
| mv $filenameZip $pluginZip | |
| sha1sum $pluginZip | cut -d " " -f 1 >> $pluginZip.sha1 | |
| name=${pluginZip/.zip/} | |
| version="${name#*-}" | |
| filenamePom=$(find . -name "pom.xml" | head -1) | |
| mv $filenamePom ./tomcat-${version}.pom | |
| filenamePom=$(basename $filenamePom) | |
| sha1sum tomcat-${version}.pom | cut -d " " -f 1 >> tomcat-${version}.pom.sha1 | |
| mkdir -p ./plugin-artifacts | |
| mv tomcat-* ./plugin-artifacts/. | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: plugin-artifacts | |
| path: plugin-artifacts |