feat: upgrade from v1.0.0-dev.181 to v1.0.0-dev.182 #201
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 # to be able to publish a GitHub release | |
| issues: write # to be able to comment on released issues | |
| pull-requests: write # to be able to comment on released pull requests | |
| id-token: write # to enable use of OIDC for npm provenance | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - 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 }}" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} | |
| 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 # to be able to publish a GitHub release | |
| issues: write # to be able to comment on released issues | |
| pull-requests: write # to be able to comment on released pull requests | |
| id-token: write # to enable use of OIDC for npm provenance | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Extract branch name | |
| shell: bash | |
| run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
| id: extract_branch | |
| - 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 | |
| - name: Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} | |
| run: bunx semantic-release |