Bump org.apache.maven.plugins:maven-dependency-plugin (#450) #969
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: GitHub Build | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| tags: [ "v*.*.*" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| java-version: [ 21, 26 ] | |
| name: Build with Java ${{ matrix.java-version }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up JDK ${{ matrix.java-version }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java-version }} | |
| cache: 'maven' | |
| - name: Build with Maven (Linux) | |
| run: | | |
| xvfb-run -a mvn -B -V -ntp -Djansi.passthrough=true -Dstyle.color=always package | |
| rm target/original-*.jar | |
| - name: Put the current date in the environment file | |
| run: echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | |
| - name: Archive artifacts | |
| if: matrix.java-version == 21 | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: PixelitorJAR-${{ env.DATE }} | |
| path: target/*.jar | |
| if-no-files-found: error | |
| release: | |
| name: Draft Release | |
| needs: build | |
| # only run this job if a version tag is pushed | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| steps: | |
| # `gh release create` needs the repository context | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| # downloads the previously archived artifacts into the target directory | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| pattern: PixelitorJAR-* | |
| merge-multiple: true | |
| path: target | |
| - name: Draft a release | |
| env: | |
| GITHUB_TOKEN: ${{ github.TOKEN }} | |
| run: | | |
| DATE=$(date +"%b %-d, %Y") | |
| TAG_NAME=${GITHUB_REF#refs/tags/v} | |
| gh release create "v$TAG_NAME" --draft --title "$TAG_NAME - released on $DATE" target/*.jar |