summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorSho Sakuma <me@m1sk9.dev>2026-04-04 20:57:03 +0900
committerSho Sakuma <me@m1sk9.dev>2026-04-04 21:06:12 +0900
commit178f5e3d538d1b54aa5f0c6637d8b0b7981ed802 (patch)
tree1322afbcc7291feaf69ad96d5aa08acab04b1b1a /.github/workflows
parent2b0829856c9a24b90a9248d28c7de84101b83232 (diff)
downloadLunaticChat-178f5e3d538d1b54aa5f0c6637d8b0b7981ed802.tar.gz
LunaticChat-178f5e3d538d1b54aa5f0c6637d8b0b7981ed802.tar.bz2
LunaticChat-178f5e3d538d1b54aa5f0c6637d8b0b7981ed802.zip
ci: Remove nightly release
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/release-nightly.yaml134
1 files changed, 0 insertions, 134 deletions
diff --git a/.github/workflows/release-nightly.yaml b/.github/workflows/release-nightly.yaml
deleted file mode 100644
index daa31fe..0000000
--- a/.github/workflows/release-nightly.yaml
+++ /dev/null
@@ -1,134 +0,0 @@
-name: Nightly Release
-
-on:
- schedule:
- - cron: '0 0 * * *' # Daily at UTC 00:00 (JST 09:00)
- workflow_dispatch:
-
-jobs:
- check:
- runs-on: ubuntu-24.04
- outputs:
- has_changes: ${{ steps.check.outputs.has_changes }}
- steps:
- - name: Checkout repository
- uses: actions/checkout@v6
- with:
- fetch-depth: 0
-
- - name: Check for new commits since last nightly
- id: check
- env:
- GH_TOKEN: ${{ github.token }}
- run: |
- LAST_NIGHTLY_SHA=$(gh release view nightly --json targetCommitish --jq '.targetCommitish' 2>/dev/null || echo "")
- HEAD_SHA=$(git rev-parse HEAD)
-
- if [ "$LAST_NIGHTLY_SHA" = "$HEAD_SHA" ]; then
- echo "No new commits since last nightly release"
- echo "has_changes=false" >> $GITHUB_OUTPUT
- else
- echo "New commits found (last: ${LAST_NIGHTLY_SHA:-none}, current: $HEAD_SHA)"
- echo "has_changes=true" >> $GITHUB_OUTPUT
- fi
-
- build:
- runs-on: ubuntu-24.04
- needs: check
- if: needs.check.outputs.has_changes == 'true'
- outputs:
- version: ${{ steps.version.outputs.version }}
- paper_jar_name: ${{ steps.version.outputs.paper_jar_name }}
- velocity_jar_name: ${{ steps.version.outputs.velocity_jar_name }}
- steps:
- - name: Checkout repository
- uses: actions/checkout@v6
-
- - name: Compute nightly version
- id: version
- run: |
- PAPER_BASE=$(grep '^paperVersion=' gradle.properties | cut -d'=' -f2)
- VELOCITY_BASE=$(grep '^velocityVersion=' gradle.properties | cut -d'=' -f2)
- SHORT_HASH=$(git rev-parse --short HEAD)
-
- PAPER_NIGHTLY="${PAPER_BASE}-nightly.${SHORT_HASH}"
- VELOCITY_NIGHTLY="${VELOCITY_BASE}-nightly.${SHORT_HASH}"
-
- echo "version=${PAPER_NIGHTLY}" >> $GITHUB_OUTPUT
- echo "paper_version=${PAPER_NIGHTLY}" >> $GITHUB_OUTPUT
- echo "velocity_version=${VELOCITY_NIGHTLY}" >> $GITHUB_OUTPUT
- echo "paper_jar_name=LunaticChat-${PAPER_NIGHTLY}.jar" >> $GITHUB_OUTPUT
- echo "velocity_jar_name=LunaticChat-${VELOCITY_NIGHTLY}-velocity.jar" >> $GITHUB_OUTPUT
- echo "Paper nightly: $PAPER_NIGHTLY, Velocity nightly: $VELOCITY_NIGHTLY"
-
- - name: Setup Development Environment
- uses: jdx/mise-action@v4
-
- - name: Setup Gradle
- uses: gradle/actions/setup-gradle@v6
-
- - name: Grant execute permission for gradlew
- run: chmod +x gradlew
-
- - name: Build with shadowJar
- run: |
- ./gradlew :platform-paper:shadowJar :platform-velocity:shadowJar \
- -PpaperVersion="${{ steps.version.outputs.paper_version }}" \
- -PvelocityVersion="${{ steps.version.outputs.velocity_version }}" \
- -PisNightly=true \
- --parallel --no-daemon
-
- - name: Upload build artifacts
- uses: actions/upload-artifact@v7
- with:
- name: LunaticChat-nightly-${{ steps.version.outputs.version }}
- path: |
- platform-paper/build/libs/${{ steps.version.outputs.paper_jar_name }}
- platform-velocity/build/libs/${{ steps.version.outputs.velocity_jar_name }}
- retention-days: 7
-
- release:
- runs-on: ubuntu-24.04
- needs: build
- permissions:
- contents: write
- steps:
- - name: Checkout repository
- uses: actions/checkout@v6
-
- - name: Download build artifact
- uses: actions/download-artifact@v8
- with:
- name: LunaticChat-nightly-${{ needs.build.outputs.version }}
-
- - name: Delete existing nightly release
- env:
- GH_TOKEN: ${{ github.token }}
- run: |
- gh release delete nightly --yes --cleanup-tag 2>/dev/null || true
-
- - name: Create nightly release
- env:
- GH_TOKEN: ${{ github.token }}
- run: |
- VERSION=${{ needs.build.outputs.version }}
- PAPER_JAR_NAME=${{ needs.build.outputs.paper_jar_name }}
- VELOCITY_JAR_NAME=${{ needs.build.outputs.velocity_jar_name }}
-
- gh release create nightly \
- "platform-paper/build/libs/$PAPER_JAR_NAME" \
- "platform-velocity/build/libs/$VELOCITY_JAR_NAME" \
- --title "Nightly Build ($VERSION)" \
- --target ${{ github.sha }} \
- --prerelease \
- --notes "$(cat <<EOF
- This is an automatically generated nightly build from the latest \`main\` branch.
-
- **Warning:** This build may be unstable or contain bugs. Do not use in production environments.
-
- - **Version:** \`$VERSION\`
- - **Commit:** ${{ github.sha }}
-
- If you encounter any issues, please report them on [GitHub Issues](https://github.com/m1sk9/LunaticChat/issues).
- EOF
- )"