forked from funniray/minimap-control
-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (38 loc) · 1.05 KB
/
gradle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Java CI with Gradle
on:
push:
branches: [ main ]
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
cache: 'gradle'
- name: Bump version and push tag
id: tag_version
uses: anothrNick/github-tag-action@1.55.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
INITIAL_VERSION: 1.0.0
- name: Build with Gradle
run: ./gradlew build
env:
VERSION: ${{ steps.tag_version.outputs.new_tag }}
- uses: actions/upload-artifact@v2
with:
name: Package
path: build
- uses: ncipollo/release-action@v1
with:
artifacts: "build/*"
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
token: ${{ secrets.GITHUB_TOKEN }}