feat: upgrade panel-ui from v1.0.0-dev.181 to v1.0.0-dev.182 #203
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: Pano Release | |
| on: | |
| push: | |
| branches: [ "alpha", "beta", "main" ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| get_next_version: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: Dry run to get next release version | |
| id: get_next_version | |
| run: | | |
| export NEXT_TAG_VERSION=$(bunx semantic-release --dry-run | grep 'next release version is ' | awk -F"next release version is " '{print $2}') | |
| echo "new_tag_version=${NEXT_TAG_VERSION}" >> $GITHUB_OUTPUT | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} | |
| - name: Echo new_tag_version | |
| run: | | |
| echo "Extracted Tag Version: ${{ steps.get_next_version.outputs.new_tag_version }}" | |
| outputs: | |
| new_tag_version: ${{ steps.get_next_version.outputs.new_tag_version }} | |
| build_and_release: | |
| runs-on: ubuntu-latest | |
| needs: get_next_version | |
| if: ${{ needs.get_next_version.outputs.new_tag_version != '' }} | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Extract branch name | |
| id: extract_branch | |
| shell: bash | |
| run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
| - name: Get Time | |
| id: time | |
| uses: nanzm/get-time-action@v1.1 | |
| with: | |
| timeZone: 8 | |
| format: 'YYYYMMDDHHmmss' | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 11 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Build | |
| run: | | |
| ./gradlew ${{ steps.extract_branch.outputs.branch == 'main' && 'build' || 'buildDev' }} \ | |
| -PbuildType=${{ steps.extract_branch.outputs.branch == 'main' && 'release' || steps.extract_branch.outputs.branch }} \ | |
| -Pversion=${{ needs.get_next_version.outputs.new_tag_version }} \ | |
| -PtimeStamp=${{ steps.time.outputs.time }} | |
| - uses: oven-sh/setup-bun@v2 | |
| # UI changelog'u 眉ret (ZIP adlar谋ndan aral谋klar谋 bulup notlar谋 topla) | |
| - name: Generate UI changelog | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} | |
| run: | | |
| bun ./scripts/aggregate-ui-changelog.js | |
| test -f UI_CHANGELOG.md && sed -n '1,120p' UI_CHANGELOG.md || true | |
| - name: Release (semantic-release) | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} | |
| run: bunx semantic-release | |
| # Son release'in body鈥檚ine UI_CHANGELOG.md i莽eri臒ini ekle | |
| - name: Append UI changelog to latest release | |
| if: success() | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const path = 'UI_CHANGELOG.md'; | |
| if (!fs.existsSync(path)) { | |
| core.info('UI_CHANGELOG.md not found, skipping.'); | |
| return; | |
| } | |
| const extra = fs.readFileSync(path, 'utf8').trim(); | |
| if (!extra) { | |
| core.info('UI_CHANGELOG.md empty, skipping.'); | |
| return; | |
| } | |
| const { owner, repo } = context.repo; | |
| const { data: releases } = await github.rest.repos.listReleases({ | |
| owner, repo, per_page: 1 | |
| }); | |
| if (!releases.length) { | |
| core.warning('No releases found to update.'); | |
| return; | |
| } | |
| const rel = releases[0]; | |
| const newBody = (rel.body || '') + '\n\n' + extra; | |
| await github.rest.repos.updateRelease({ | |
| owner, repo, release_id: rel.id, body: newBody | |
| }); | |
| core.info('Appended UI changelog to the latest release.'); |