update workflow #8
Workflow file for this run
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: Release Modpack Build | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| env: | |
| MANIFEST_REPO: GregTechLite/gregtechlite.github.io | |
| MANIFEST_BRANCH: test | |
| MANIFEST_BASE_URL: https://gregtechlite.github.io | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| release: | |
| 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: Validate release tag | |
| run: | | |
| expected_tag="v${VERSION}" | |
| if [ "${GITHUB_REF_NAME}" != "${expected_tag}" ]; then | |
| echo >&2 "Tag ${GITHUB_REF_NAME} does not match pack version ${expected_tag}" | |
| exit 1 | |
| fi | |
| - name: Prepare manifest | |
| run: bash .github/scripts/manifest.sh | |
| - name: Package client | |
| id: package | |
| run: bash .github/scripts/client.sh "${SLUG}-${VERSION}" | |
| - name: Package server | |
| id: package_server | |
| run: bash .github/scripts/server.sh "${SLUG}-${VERSION}" "${MANIFEST_BASE_URL}/releases/${VERSION}/pack.toml" | |
| - name: Deploy release 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: releases/${{ env.VERSION }} | |
| user_name: 'github-actions[bot]' | |
| user_email: 'github-actions[bot]@users.noreply.github.com' | |
| commit_message: "Release ${{ env.VERSION }}" | |
| - name: Publish release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| name: Release ${{ env.VERSION }} | |
| prerelease: false | |
| makeLatest: true | |
| artifacts: | | |
| ${{ steps.package.outputs.curseforge_zip }} | |
| ${{ steps.package_server.outputs.server_zip }} | |
| generateReleaseNotes: true |