Update README.md #13
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: auto-build | |
on: | |
push: | |
branches: | |
- 'master' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_ACTION_NUMBER: ${{ vars.GITHUB_RUN_NUMBER }} | |
GITHUB_RUN_NUMBER: ${{ vars.GITHUB_RUN_NUMBER }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build | |
uses: gradle/gradle-build-action@v2.4.2 | |
with: | |
arguments: build | |
- name: Get Version | |
id: var | |
run: | | |
MESSAGE=$(ls build/libs/* | grep sources.jar -v | grep shadow.jar -v | awk -F 'gtec-|.jar' '{print $2}') | |
echo version=$MESSAGE >> $GITHUB_OUTPUT | |
- name: release | |
uses: Kir-Antipov/mc-publish@v3.3 | |
with: | |
github-tag: ${{ steps.var.outputs.version }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
files: | | |
build/libs/!(*-@(dev|sources|javadoc|dev-shadow)).jar |