Skip to content

updated CI and CD file #1

updated CI and CD file

updated CI and CD file #1

Workflow file for this run

name: CI
on:
# pull_request:
push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: 'maven'
- name: Test
run: mvn test
- name: Build with Maven
run: |
mvn -B -P github package -file pom.xml
cat $GITHUB_WORKSPACE/settings.xml
# mkdir staging && cp target/*.jar staging
- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_USER_REF: ${{ secrets.GH_PACKAGE_REPO_USERNAME }}
GITHUB_TOKEN_REF: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }}
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: Package
path: staging