build: fix mixin in reobf process #51
This file contains hidden or 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: snapshot | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| concurrency: | |
| group: snapshot | |
| cancel-in-progress: true | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Java | |
| uses: actions/setup-java@v2 | |
| with: | |
| distribution: adopt | |
| java-version: 21 | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cache Gradle packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: ${{ runner.os }}-gradle- | |
| - name: Build | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| chmod +x ./gradlew | |
| ./gradlew build | |
| - name: Extract Current Minecraft Version | |
| id: get_version | |
| run: echo "version=$(grep 'const val MOD_VERSION' buildSrc/src/main/kotlin/club/asynclab/asyncauth/Props.kt | sed -E 's/.*const val MOD_VERSION = "([^"]+)".*/\1/')" >> $GITHUB_OUTPUT | |
| - name: Generate Changelog | |
| id: get_changelog | |
| run: | | |
| tag="$(git --no-pager tag --sort=creatordate --merged ${{ github.ref_name }} | grep nightly | tail -1)" | |
| limit="-1" | |
| if [ -n "$tag" ]; then | |
| limit="$tag..HEAD" | |
| fi | |
| changelog="$(echo -ne "$(git log "$limit" --pretty=format:'- %s')")" | |
| changelog="$(echo "$changelog" | sed 's/$/ /')" | |
| { | |
| echo 'changelog<<EOF' | |
| echo "$changelog" | |
| echo 'EOF' | |
| } >> $GITHUB_OUTPUT | |
| - name: Update Nightly Release | |
| uses: andelf/nightly-release@main | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: nightly | |
| name: nightly-${{ steps.get_version.outputs.version }}-$$-${{ github.run_id }} | |
| prerelease: true | |
| body: ${{ steps.get_changelog.outputs.changelog }} | |
| files: "**/build/libs/*-all.jar" |