2.0.1 #96
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |