Skip to content

spucman is testing out GitHub Actions πŸš€ #3

spucman is testing out GitHub Actions πŸš€

spucman is testing out GitHub Actions πŸš€ #3

Workflow file for this run

name: Build
run-name: ${{ github.actor }} is testing out GitHub Actions πŸš€
on:
pull_request:
types: [opened, reopened, synchronize]
branches:
- 'main'
push:
branches:
- 'main'
jobs:
test:
strategy:
matrix:
java-version: [ 8, 11, 17 ]
include:
- java-version: 17
dep-path: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
cache: maven
- name: Test with Maven
run: mvn --batch-mode --update-snapshots verify
- if: ${{ matrix.dep-path }}
name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
deploy-snapshot:
if: github.event_name == 'push' && github.ref_name == 'main'
needs: build

Check failure on line 39 in .github/workflows/maven-build.yml

View workflow run for this annotation

GitHub Actions / Build

Invalid workflow file

The workflow is not valid. .github/workflows/maven-build.yml (Line: 39, Col: 12): Job 'deploy-snapshot' depends on unknown job 'build'.
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v5
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
server-id: timeular.oss.sonatype.org
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Build with Maven
run: mvn --batch-mode package
- name: Publish snapshot
run: mvn --batch-mode deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PWD }}