Skip to content

Merge pull request #37 from CyR1en/development #155

Merge pull request #37 from CyR1en/development

Merge pull request #37 from CyR1en/development #155

Workflow file for this run

name: Java CI
on:
push:
branches:
- master
release:
types:
- created
jobs:
build:
if: github.event_name != 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- name: Set up JDK
uses: actions/setup-java@v2.5.0
with:
distribution: temurin
java-version: 17
- name: Build with Gradle
run: ./gradlew clean build
- name: Upload artifact
uses: actions/upload-artifact@v2.3.1
with:
name: CommandPrompter
path: build/libs
publish:
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- name: Set up JDK
uses: actions/setup-java@v2.5.0
with:
distribution: temurin
java-version: 17
- name: Publish to Kakuno
env:
KAKUNO_USER: ${{ secrets.KAKUNO_USER }}
KAKUNO_TOKEN: ${{ secrets.KAKUNO_TOKEN }}
run: ./gradlew clean build publish
- name: Export LATEST_TAG
run: |
echo "LATEST_TAG=$(curl -qsSL \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"${{ github.api_url }}/repos/${{ github.repository }}/releases/latest" \
| jq -r .tag_name)" >> $GITHUB_ENV
- name: Upload Release Artifact
env:
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run:
gh release upload ${{ env.LATEST_TAG }} build/libs/*.jar