This repository was archived by the owner on Oct 15, 2023. It is now read-only.
forked from boy0001/FastAsyncWorldedit
-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (43 loc) · 1.48 KB
/
gradle-release.yml
File metadata and controls
45 lines (43 loc) · 1.48 KB
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
44
45
name: release
on:
push:
tags:
- '*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Cache Gradle packages
uses: burrunan/gradle-cache-action@v1
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Retrieve github tag
id: github_tag
run: echo ::set-output name=RESULT::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Build with Gradle
run: ./gradlew shadowJar --no-parallel --no-daemon --build-cache -Pgithub.tag=${{ steps.github_tag.outputs.RESULT }} -Pgpr.user=${{ github.actor }} -Pgpr.password=${{secrets.GITHUB_TOKEN}}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
- name: Upload FastAsyncWorldEdit.jar
id: upload-FastAsyncWorldEdit-jar
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./output/FastAsyncWorldEdit.jar
asset_name: FastAsyncWorldEdit.jar
asset_content_type: application/java-archive