Skip to content

bump java version in github actions #26

bump java version in github actions

bump java version in github actions #26

Workflow file for this run

name: build
on: ['push']
jobs:
Test:
name: "🔨 Test code"
runs-on: ubuntu-latest
strategy:
matrix:
jdk: [ '11', '21' ]
steps:
- name: Setup Java ${{ matrix.jdk }} JDK
uses: actions/setup-java@v3.2.0
with:
distribution: 'temurin'
java-version: ${{ matrix.jdk }}
- name: Checkout Code
uses: actions/checkout@v2
- name: Validate Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup and Run Gradle
run: ./gradlew test
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
MAVEN_NAME: ${{ secrets.MAVEN_NAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
Publish:
if: github.ref == 'refs/heads/master'
needs:
- Test
name: "📄 Publish to maven repo"
runs-on: ubuntu-latest
steps:
- name: Setup Java JDK
uses: actions/setup-java@v3.2.0
with:
distribution: 'temurin'
java-version: '21'
- name: Checkout Code
uses: actions/checkout@v2
- name: Validate Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup and Run Gradle
run: ./gradlew publishAllPublicationsToReleasesRepository
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
MAVEN_NAME: ${{ secrets.MAVEN_NAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}