ci: Add packaging and release workflows, update issue templates (#31) #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Nightly Modpack Build | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| env: | |
| MANIFEST_REPO: GregTechLite/gregtechlite.github.io | |
| MANIFEST_BRANCH: main | |
| MANIFEST_BASE_URL: https://gregtechlite.github.io | |
| 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: cachix/install-nix-action@v31 | |
| - name: Load devShell | |
| uses: rrbutani/use-nix-shell-action@v1 | |
| with: | |
| devShell: .#default | |
| - name: Resolve metadata | |
| run: bash .github/scripts/meta.sh | |
| - name: Prepare manifest | |
| run: bash .github/scripts/manifest.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" "${MANIFEST_BASE_URL}/nightly/pack.toml" | |
| - name: Deploy nightly manifest | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| deploy_key: ${{ secrets.MANIFEST_DEPLOY_KEY }} | |
| external_repository: ${{ env.MANIFEST_REPO }} | |
| publish_branch: ${{ env.MANIFEST_BRANCH }} | |
| publish_dir: dist/manifest | |
| destination_dir: nightly | |
| user_name: 'github-actions[bot]' | |
| user_email: 'github-actions[bot]@users.noreply.github.com' | |
| commit_message: "Nightly ${{ env.SHORT_SHA }}" | |
| - 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 }} | |
| prerelease: true | |
| artifacts: | | |
| ${{ steps.package.outputs.curseforge_zip }} | |
| ${{ steps.package_server.outputs.server_zip }} | |
| allowUpdates: true | |
| updateOnlyUnreleased: true | |
| generateReleaseNotes: 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 }} | |
| if-no-files-found: error |