fix(dashboard): support Fill Screen for landscape and stabilize its s… #246
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 Please | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| actions: write | |
| concurrency: | |
| group: release-please-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| release-please: | |
| name: Create Release PR / Tag | |
| runs-on: ubuntu-latest | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| tag_name: ${{ steps.release.outputs.tag_name }} | |
| steps: | |
| - name: Run Release Please | |
| id: release | |
| uses: googleapis/release-please-action@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| config-file: release-please-config.json | |
| manifest-file: .release-please-manifest.json | |
| - name: Checkout | |
| if: ${{ steps.release.outputs.release_created != 'true' }} | |
| uses: actions/checkout@v4 | |
| - name: Sync PAD release date and changelog | |
| if: ${{ steps.release.outputs.release_created != 'true' }} | |
| shell: bash | |
| run: | | |
| if ! git ls-remote --exit-code --heads origin release-please--branches--main >/dev/null 2>&1; then | |
| echo "No open release-please PR branch, nothing to sync" | |
| exit 0 | |
| fi | |
| git fetch origin release-please--branches--main:release-please--branches--main | |
| git checkout release-please--branches--main | |
| section=$(awk '/^## \[/{if (++n==2) exit} n==1' CHANGELOG.md) | |
| date=$(echo "$section" | grep -m1 -oP '^## \[[^]]+\].*\(\K[0-9]{4}-[0-9]{2}-[0-9]{2}' || true) | |
| if [ -z "$date" ]; then | |
| echo "Could not find a release date in CHANGELOG.md" | |
| exit 0 | |
| fi | |
| year=${date%%-*} | |
| rest=${date#*-} | |
| month=${rest%%-*} | |
| day=${rest#*-} | |
| # Turn "* **scope:** subject ([hash](url)), closes [#N](url)" bullets into | |
| # "scope: subject; scope: subject" -- plain text, no markdown/links. | |
| changeInfo=$(echo "$section" \ | |
| | grep '^\* ' \ | |
| | sed -E 's/^\* //; s/\*\*//g; s/ \(\[[0-9a-f]+\]\([^)]+\)\)(, closes \[#[0-9]+\]\([^)]+\))?//' \ | |
| | sed 's/&/\&/g; s/</\</g; s/>/\>/g' \ | |
| | paste -sd';' - \ | |
| | sed 's/;/; /g') | |
| if [ -z "$changeInfo" ]; then | |
| echo "Could not find any changelog bullets, leaving Program_Change_Info as-is" | |
| fi | |
| sed -i "s#<Program_Release_Month>.*</Program_Release_Month>#<Program_Release_Month>${month}</Program_Release_Month>#" website/pad.xml | |
| sed -i "s#<Program_Release_Day>.*</Program_Release_Day>#<Program_Release_Day>${day}</Program_Release_Day>#" website/pad.xml | |
| sed -i "s#<Program_Release_Year>.*</Program_Release_Year>#<Program_Release_Year>${year}</Program_Release_Year>#" website/pad.xml | |
| if [ -n "$changeInfo" ]; then | |
| sed -i "s|<Program_Change_Info>.*</Program_Change_Info>|<Program_Change_Info>${changeInfo}</Program_Change_Info>|" website/pad.xml | |
| fi | |
| if git diff --quiet -- website/pad.xml; then | |
| echo "PAD file already up to date" | |
| exit 0 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add website/pad.xml | |
| git commit -m "chore(distribution): sync PAD release date and changelog" | |
| git push origin HEAD:release-please--branches--main | |
| trigger-build: | |
| name: Trigger Release Build | |
| needs: release-please | |
| if: ${{ needs.release-please.outputs.release_created == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Dispatch release workflow | |
| uses: actions/github-script@v7 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| await github.rest.actions.createWorkflowDispatch({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| workflow_id: 'release.yml', | |
| ref: '${{ needs.release-please.outputs.tag_name }}', | |
| inputs: { | |
| tag: '${{ needs.release-please.outputs.tag_name }}' | |
| } | |
| }) |