Building in CI
Store the key as a repository secret and write it to .env before the build. This works with the .env setup.
1. Add the secret
In GitHub, open Settings → Secrets and variables → Actions → New repository secret. Name it NITEA_SDK_KEY and paste your key.
2. Write .env in your workflow
.github/workflows/build.yml
name: Build
on:
push:
branches: [main]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 25
- uses: gradle/actions/setup-gradle@v4
- name: Write .env
run: echo "NITEA_SDK_KEY=${{ secrets.NITEA_SDK_KEY }}" > .env
- run: ./gradlew build
Pull requests from forks don't get secrets, so those builds have reporting off. That's fine: only your release builds need the key.
Check the jar
Before publishing, open your built jar and check it contains:
nitea/<modid>.properties- the Nitea jar under
META-INF/jarjar/(NeoForge, Forge) orMETA-INF/jars/(Fabric)