├── .github └── workflows │ └── build.yaml ├── .gitignore ├── LICENSE ├── README.md └── latest_commit /.github/workflows/build.yaml: -------------------------------------------------------------------------------- 1 | name: Auto Releases 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: "0 0 * * *" 7 | 8 | jobs: 9 | 10 | check: 11 | 12 | outputs: 13 | should_run: ${{ steps.checker.outputs.should_run }} 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Checkout this repository 17 | uses: actions/checkout@v4.2.2 18 | with: 19 | fetch-tags: true 20 | fetch-depth: 0 21 | 22 | - name: Checkout Celeritas 23 | run: | 24 | git clone https://git.taumc.org/embeddedt/celeritas.git 25 | 26 | - name: Get latest hash 27 | working-directory: ./celeritas 28 | run: echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV 29 | 30 | 31 | - name: Get previous hash 32 | run: echo "PREVIOUS_HASH=$(cat ./latest_commit)" >> $GITHUB_ENV 33 | 34 | - name: Check if new commits appear 35 | id: checker 36 | run: | 37 | if [[ "${{ env.COMMIT_HASH }}" == "${{ env.PREVIOUS_HASH }}" ]] 38 | then 39 | echo "should_run=false" >> $GITHUB_OUTPUT 40 | else 41 | echo "should_run=true" >> $GITHUB_OUTPUT 42 | fi 43 | 44 | 45 | publish: 46 | runs-on: ubuntu-latest 47 | permissions: 48 | contents: write 49 | needs: [check] 50 | if: needs.check.outputs.should_run == 'true' 51 | steps: 52 | - name: Debug 53 | run: echo "${{ needs.check.outputs.should_run }}" 54 | 55 | - name: Checkout this repository 56 | uses: actions/checkout@v4.2.2 57 | with: 58 | fetch-tags: true 59 | fetch-depth: 0 60 | 61 | - name: Checkout Celeritas 62 | run: | 63 | git clone https://git.taumc.org/embeddedt/celeritas.git 64 | 65 | - name: Get latest hash 66 | working-directory: ./celeritas 67 | run: echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV 68 | 69 | 70 | - name: Get previous hash 71 | run: echo "PREVIOUS_HASH=$(cat ./latest_commit)" >> $GITHUB_ENV 72 | 73 | - name: Get latest describe 74 | working-directory: ./celeritas 75 | run: echo "LATEST_DESCRIBE=$(git describe --tags)" >> $GITHUB_ENV 76 | 77 | - name: Get current date 78 | run: echo "CURRENT_DATE=$(date +'%Y%m%dT%H%M%S')" >> $GITHUB_ENV 79 | 80 | - name: Write release body file 81 | working-directory: ./celeritas 82 | run: | 83 | echo 'Built on commit: [link](https://git.taumc.org/embeddedt/celeritas/commit/$COMMIT_HASH)' >> body.txt 84 | echo >> body.txt 85 | git rev-list $PREVIOUS_HASH^..$COMMIT_HASH --pretty >> body.txt 86 | 87 | - name: Set up JDK 8 88 | uses: actions/setup-java@v4.7.1 89 | with: 90 | java-version: '8' 91 | distribution: 'temurin' 92 | 93 | - name: Set up JDK 21 94 | uses: actions/setup-java@v4.7.1 95 | with: 96 | java-version: '21' 97 | distribution: 'temurin' 98 | 99 | - name: Fix Gradle permission 100 | run: chmod +x ./celeritas/gradlew 101 | 102 | - name: Build Jars 103 | working-directory: ./celeritas 104 | run: ./gradlew -Ptarget_versions=1.12.2 packageJar 105 | 106 | - name: Remove dev jars 107 | working-directory: ./celeritas/forge122/versions/1.12.2/build/libs 108 | run: | 109 | rm *-dev-dev.jar 110 | rm *-dev-remapped-thin.jar 111 | 112 | - name: Update hash storage 113 | run: echo $COMMIT_HASH > ./latest_commit 114 | 115 | - name: Commit hash update 116 | uses: EndBug/add-and-commit@v9.1.4 117 | with: 118 | add: 'latest_commit' 119 | push: true 120 | tag: ${{ env.LATEST_DESCRIBE }}-${{ env.CURRENT_DATE }} 121 | 122 | - uses: ncipollo/release-action@v1.14.0 123 | with: 124 | artifacts: 'celeritas/forge122/versions/1.12.2/build/libs/*.jar' 125 | generateReleaseNotes: false 126 | bodyFile: "celeritas/body.txt" 127 | tag: ${{ env.LATEST_DESCRIBE }}-${{ env.CURRENT_DATE }} 128 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Celeritas-auto-build 2 | 3 | Auto builds of https://git.taumc.org/embeddedt/celeritas 4 | 5 | Not based on tag so highly risky, use at your own risk 6 | 7 | Do not use the `-dev-dev.jar` and `-dev-remapped-thin.jar `! 8 | -------------------------------------------------------------------------------- /latest_commit: -------------------------------------------------------------------------------- 1 | 2ba4dadb89c7239f674b7fd5ca8a227aa178eb46 2 | --------------------------------------------------------------------------------