diff --git a/.github/workflows/rcss-nightly.yml b/.github/workflows/rcss-nightly.yml new file mode 100644 index 000000000..47d4a485a --- /dev/null +++ b/.github/workflows/rcss-nightly.yml @@ -0,0 +1,70 @@ +name: RCSS Nighty Builds + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PACK_NAME: Re-Console-Server-Software + OUTPUT: artifacts + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + + - name: Install Packwiz + run: go install github.com/packwiz/packwiz@latest + + - name: Create short commit SHA + id: vars + run: | + shortSha=$(git rev-parse --short ${{ github.sha }}) + echo "COMMIT_SHORT_SHA=$shortSha" >> $GITHUB_ENV + + - name: Prepare Builds + run: | + mkdir RCSS-Modrinth-1.21.1-temp + cp -r ./versions/rcss/modrinth/fabric/1.21.1/* ./RCSS-Modrinth-1.21.1-temp/ + cp ./LICENSE.md ./RCSS-Modrinth-1.21.1-temp/ + cp ./README.md ./RCSS-Modrinth-1.21.1-temp/ + + mkdir RCSS-Modrinth-1.21.4-temp + cp -r ./versions/rcss/modrinth/fabric/1.21.4/* ./RCSS-Modrinth-1.21.4-temp/ + cp ./LICENSE.md ./RCSS-Modrinth-1.21.4-temp/ + cp ./README.md ./RCSS-Modrinth-1.21.4-temp/ + + - name: Create 1.21.1 build + run: | + cd ./RCSS-Modrinth-1.21.1-temp/ + packwiz refresh + packwiz modrinth export --output ${PACK_NAME}-1.21.1-dev-${{ env.COMMIT_SHORT_SHA }}.mrpack + + - name: Create 1.21.4 build + run: | + cd ./RCSS-Modrinth-1.21.4-temp/ + packwiz refresh + packwiz modrinth export --output ${PACK_NAME}-1.21.4-dev-${{ env.COMMIT_SHORT_SHA }}.mrpack + + - name: Prepare artifacts + run: | + mkdir $OUTPUT + + mv ./RCSS-Modrinth-1.21.1-temp/${PACK_NAME}-1.21.1-dev-${{ env.COMMIT_SHORT_SHA }}.mrpack ${OUTPUT}/ + mv ./RCSS-Modrinth-1.21.4-temp/${PACK_NAME}-1.21.4-dev-${{ env.COMMIT_SHORT_SHA }}.mrpack ${OUTPUT}/ + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: "Re-Console-Server-Software-dev-${{ env.COMMIT_SHORT_SHA }}" + path: artifacts