Skip to content

Commit

Permalink
Merge pull request #110 from BlazingTwist/github-actions-maven
Browse files Browse the repository at this point in the history
Implement automation using Github Actions
  • Loading branch information
nick-paul authored Nov 14, 2024
2 parents c45ab4a + a59cb5a commit 01478d2
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Package and Upload a release.zip
# See https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-java-with-maven

name: Publish release

on:
push:
branches: [ "master" ]
# Allows you to manually run the workflow (for testing)
workflow_dispatch:

jobs:
build:
name: Build and package Aya
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: maven
- name: Run install phase
run: mvn install --batch-mode
- name: Publish the artifact
uses: actions/upload-artifact@v4
with:
name: aya.zip
path: target/aya-*.zip
29 changes: 29 additions & 0 deletions .github/workflows/maven-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Run the Maven 'test' phase whenever a pull request is opened
# See https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-java-with-maven

name: Run Maven tests

on:
pull_request:
branches: [ "master" ]
# Allows you to manually run the workflow (for testing)
workflow_dispatch:

jobs:
build:
name: Build and run tests
runs-on: ubuntu-latest
permissions:
# allows this workflow to create check runs (their passing/failure is shown on the PR)
checks: write
contents: read
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: maven
- name: Run test phase
run: mvn test --batch-mode

0 comments on commit 01478d2

Please sign in to comment.