Skip to content

Commit

Permalink
build: enable GitHub Actions support
Browse files Browse the repository at this point in the history
  • Loading branch information
Fei1Yang committed Jan 8, 2024
1 parent 91725dd commit e08aae2
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Java CI

on:
push:
branches:
- "**"
tags:
- "**"
pull_request:
branches:
- "**"
tags:
- "**"
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Build Java Archive
run: |
chmod +x gradlew
./gradlew jar
- name: Upload build
uses: actions/upload-artifact@v3
with:
name: jar
path: app/build/libs/**/*
- name: Publish release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && startsWith(github.ref, 'refs/tags/') }}
run: |
cd app/build/libs
gh release create --title "Release ${{ github.ref_name }}" "${{ github.ref_name }}" *

0 comments on commit e08aae2

Please sign in to comment.