Skip to content

πŸ”’ New Unity Editor Releases #39

πŸ”’ New Unity Editor Releases

πŸ”’ New Unity Editor Releases #39

name: update-changesets
env:
WORKFLOW_FILE: update-changesets.yml
on:
issue_comment:
types:
- created
jobs:
build:
if: startsWith(github.event.comment.body, '/update-changesets') && github.event.issue.locked
name: πŸ› οΈ Update changesets
runs-on: ubuntu-latest
permissions:
contents: write
actions: read
steps:
- name: 🚚 Checkout (gh_pages)
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: gh_pages
- name: πŸ” Check other workflows
run: |
# Get in-progress or queued workflows.
gh auth login --with-token < <(echo ${{ github.token }})
RESULT=`gh run list --workflow ${{ env.WORKFLOW_FILE }} --json status --jq '[.[] | select(.status == "in_progress")] | length == 1'`
# [ERROR] Other workflows are in progress.
[ "$RESULT" = "false" ] && echo "::error::Other '${{ env.WORKFLOW_FILE }}' workflows are in progress." && exit 1 || :
- name: πŸ› οΈ Update changesets file
run: npx unity-changeset list --all --all-lifecycles > db
- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ github.token }}
amend: true
force: true
branch: gh_pages