Skip to content

fix: Hotfix server crash for Network Handler distribution (#41) #22

fix: Hotfix server crash for Network Handler distribution (#41)

fix: Hotfix server crash for Network Handler distribution (#41) #22

Workflow file for this run

name: Nightly Modpack Build
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
- 'README.md'
- 'LICENSE'
- 'NOTICE.md'
- 'CLAUDE.md'
- '.github/ISSUE_TEMPLATE/**'
env:
ARCHIVE_REPO: GregTechLite/website
ARCHIVE_BRANCH: main
ARCHIVE_BASE_URL: https://gregtechlite.morphismmc.com/archives
permissions:
contents: write
concurrency:
group: nightly-${{ github.ref }}
cancel-in-progress: true
jobs:
nightly:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref_name }}
- name: Install Nix
uses: nixbuild/nix-quick-install-action@v34
- name: Cache Nix store
uses: nix-community/cache-nix-action@v7
with:
primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.lock') }}
restore-prefixes-first-match: nix-${{ runner.os }}-
- name: Load devShell
uses: rrbutani/use-nix-shell-action@v1
with:
devShell: .#default
- name: Resolve metadata
run: bash .github/scripts/meta.sh
- name: Prepare archive
run: bash .github/scripts/archive.sh
- name: Package client
id: package
run: bash .github/scripts/client.sh "${SLUG}-nightly"
- name: Package server
id: package_server
run: bash .github/scripts/server.sh "${SLUG}-nightly" "${ARCHIVE_BASE_URL}/nightly/pack.toml"
- name: Deploy nightly archive
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.ARCHIVE_DEPLOY_KEY }}
external_repository: ${{ env.ARCHIVE_REPO }}
publish_branch: ${{ env.ARCHIVE_BRANCH }}
publish_dir: archive
destination_dir: archives/nightly
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: "Nightly ${{ env.SHORT_SHA }}"
- name: Generate changelog
id: changelog
run: bash .github/scripts/changelog.sh
- name: Update nightly tag
run: |
git tag -f nightly
git push origin nightly --force
- name: Publish nightly release
uses: ncipollo/release-action@v1
with:
tag: nightly
name: Nightly ${{ env.SHORT_SHA }}
body: ${{ steps.changelog.outputs.body }}
prerelease: true
artifacts: |
${{ steps.package.outputs.curseforge_zip }}
${{ steps.package_server.outputs.server_zip }}
allowUpdates: true
updateOnlyUnreleased: true
removeArtifacts: true
- name: Upload nightly artifacts
uses: actions/upload-artifact@v4
with:
name: "${{ env.SLUG }}-nightly-${{ env.SHORT_SHA }}"
path: |
${{ steps.package.outputs.curseforge_zip }}
${{ steps.package_server.outputs.server_zip }}
retention-days: 7
if-no-files-found: error