-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (40 loc) · 1.35 KB
/
release-workflow.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
44
45
46
name: Release Bedrockparity
# workflow by TBYT.
on: [pull_request, push]
jobs:
build-job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn -B package -T 2C
#Using this to delete releases that only have the tag "release" when maven build is successful
- uses: dev-drprasad/delete-tag-and-release@v0.2.1
with:
tag_name: pre-release #(required) tag name to delete
delete_release: true #(optional) default: true
#repo: <owner>/<repoName> #(optional) target repository. default: repo running this action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: target/BedrockParity.jar
allowUpdates: true
bodyFile: "README.md"
draft: true
prerelease: true
tag: "pre-release"
token: ${{ secrets.GITHUB_TOKEN }}