release v6.1.0 #69
Workflow file for this run
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
# This workflow will build a Java project with Gradle | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
name: auto-release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
first: | |
name: Check release tag | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
prop() { grep -P "^\s*[^#]?${1}=.*$" './gradle.properties' | cut -d'=' -f2; } | |
echo "GIT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
echo "MOD_VERSION=`echo $(prop "mod_version")`" >> $GITHUB_ENV | |
- run: if [ "${{env.GIT_TAG}}" != "v${{env.MOD_VERSION}}" ];then exit 1;fi | |
second: | |
name: Build and publish | |
runs-on: ubuntu-latest | |
needs: first | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
architecture: 'x64' | |
cache: 'gradle' | |
- name: Build and publish with Gradle | |
env: | |
IS_RELEASE: true | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
ORG_GRADLE_PROJECT_signingKey: ${{secrets.RELEASE_SIGNING_GPG_PRIVATE_KEY}} | |
ORG_GRADLE_PROJECT_signingPassword: ${{secrets.RELEASE_SIGNING_GPG_PASSPHRASE}} | |
AUIOC_MAVEN_USERNAME: ${{secrets.AUIOC_MAVEN_USERNAME}} | |
AUIOC_MAVEN_TOKEN: ${{secrets.AUIOC_MAVEN_TOKEN}} | |
run: | | |
chmod +x ./gradlew | |
./gradlew runData | |
./gradlew build publish generateUpdateJson | |
mkdir ./pages | |
cp -r ./build/tmp/update/. ./pages/ | |
- name: Update update JSON | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
clean: false | |
target-folder: update | |
branch: gh-pages | |
folder: pages | |
- name: Github release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
build/libs/*.jar | |
build/libs/*.asc |