Release NextUI #90
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 NextUI | |
| # yamllint disable-line rule:truthy | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| release_type: | |
| description: "release type" | |
| default: "patch" | |
| required: true | |
| type: choice | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| permissions: | |
| attestations: write | |
| contents: write | |
| id-token: write | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| next-tag: ${{ steps.next-tag.outputs.version }} | |
| release-name: ${{ steps.release-name.outputs.RELEASE_NAME }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Generate Release Name | |
| id: release-name | |
| run: | | |
| echo "RELEASE_NAME=$(make name)" >> "$GITHUB_OUTPUT" | |
| - name: Get Latest Tag | |
| id: latest-tag | |
| run: | | |
| echo GIT_LATEST_TAG="$(git describe --tags "$(git rev-list --tags --max-count=1)")" >>"$GITHUB_OUTPUT" | |
| - name: Compute Next Tag | |
| id: next-tag | |
| uses: docker://ghcr.io/dokku/semver-generator:latest | |
| with: | |
| bump: ${{ github.event.inputs.release_type }} | |
| input: ${{ steps.latest-tag.outputs.GIT_LATEST_TAG }} | |
| core-matrix: | |
| runs-on: ubuntu-24.04-arm | |
| env: | |
| PLATFORM: ${{ matrix.toolchain }} | |
| outputs: | |
| cores: ${{ steps.cores.outputs.cores }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| toolchain: | |
| - tg5040 | |
| - tg5050 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4.2.2 | |
| - name: Generate cores matrix | |
| id: cores | |
| run: | | |
| CORES="$(make cores-json)" | |
| echo "cores=$CORES" >> $GITHUB_OUTPUT | |
| build-core: | |
| needs: core-matrix | |
| runs-on: ubuntu-24.04-arm | |
| env: | |
| PLATFORM: ${{ matrix.toolchain }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| toolchain: | |
| - tg5040 | |
| - tg5050 | |
| core: ${{ fromJson(needs.core-matrix.outputs.cores) }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4.2.2 | |
| - name: Setup | |
| run: make setup | |
| - name: Build ${{ matrix.core }} core | |
| run: make build-core CORE=${{ matrix.core }} | |
| - name: Upload core | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: core-${{ matrix.toolchain }}-${{ matrix.core }}.zip | |
| path: workspace/${{ env.PLATFORM }}/cores/output/ | |
| build: | |
| needs: | |
| - prepare | |
| - build-core | |
| runs-on: ubuntu-24.04-arm | |
| env: | |
| RELEASE_NAME: ${{ needs.prepare.outputs.release-name }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4.2.2 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y zipmerge | |
| - name: Setup | |
| run: make setup | |
| - name: Download Cores (tg5040) | |
| uses: actions/download-artifact@v4.3.0 | |
| with: | |
| path: workspace/tg5040/cores/output/ | |
| pattern: core-tg5040-* | |
| merge-multiple: true | |
| - name: Build (tg5040) | |
| run: make tg5040 | |
| env: | |
| PLATFORM: tg5040 | |
| - name: Download Cores (tg5050) | |
| uses: actions/download-artifact@v4.3.0 | |
| with: | |
| path: workspace/tg5050/cores/output/ | |
| pattern: core-tg5050-* | |
| merge-multiple: true | |
| - name: Build (tg5050) | |
| run: make tg5050 | |
| env: | |
| PLATFORM: tg5050 | |
| - name: Special | |
| run: make special | |
| - name: Package | |
| run: make package | |
| - name: Upload All | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: ${{ env.RELEASE_NAME }}-all.zip | |
| path: releases/${{ env.RELEASE_NAME }}-all.zip | |
| - name: Upload Base | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: ${{ env.RELEASE_NAME }}-base.zip | |
| path: releases/${{ env.RELEASE_NAME }}-base.zip | |
| - name: Upload Extras | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: ${{ env.RELEASE_NAME }}-extras.zip | |
| path: releases/${{ env.RELEASE_NAME }}-extras.zip | |
| - name: Skip Attest for PRs from forks | |
| id: skip | |
| if: github.ref != 'refs/heads/main' | |
| run: | | |
| echo '::warning title=Attest skipped::Attest action requires permissions and is performed only for main branch.' | |
| - name: Attest Build Provenance | |
| uses: actions/attest-build-provenance@v2.3.0 | |
| if: github.ref == 'refs/heads/main' | |
| with: | |
| subject-path: | | |
| releases/${{ env.RELEASE_NAME }}-all.zip | |
| releases/${{ env.RELEASE_NAME }}-base.zip | |
| releases/${{ env.RELEASE_NAME }}-extras.zip | |
| release: | |
| needs: | |
| - build | |
| - prepare | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download Release Artifacts | |
| uses: actions/download-artifact@v4.3.0 | |
| with: | |
| path: releases/ | |
| pattern: NextUI-* | |
| merge-multiple: true | |
| - name: Create and Push Tag | |
| run: | | |
| git config --global user.email "action@github.com" | |
| git config --global user.name "GitHub Action" | |
| git tag "$GIT_NEXT_TAG" | |
| git push origin "$GIT_NEXT_TAG" | |
| env: | |
| GIT_NEXT_TAG: ${{ needs.prepare.outputs.next-tag }} | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: releases/* | |
| generate_release_notes: true | |
| append_body: true | |
| tag_name: ${{ needs.prepare.outputs.next-tag }} | |
| make_latest: "true" | |
| body: | | |
| For full features list and help on how to use etc of NextUI: | |
| https://nextui.loveretro.games/docs/ | |
| ## How to install/update | |
| For a fresh installation, follow the instructions here: https://nextui.loveretro.games/getting-started/installation/ | |
| When updating from a previous release: https://nextui.loveretro.games/getting-started/updating/ | |