mirror of https://github.com/axmolengine/axmol.git
76 lines
2.7 KiB
YAML
76 lines
2.7 KiB
YAML
name: update-prebuilts
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
# Inputs the workflow accepts.
|
|
inputs:
|
|
build1k_rel_tag:
|
|
# actions run ID
|
|
description: 'Please input build1k release tag, such as v57'
|
|
# Default value if no value is explicitly provided
|
|
default: ''
|
|
# Input has to be provided for the workflow to run
|
|
required: true
|
|
force_update:
|
|
# actions run ID
|
|
description: 'Whether force update'
|
|
# Default value if no value is explicitly provided
|
|
default: 'false'
|
|
# Input has to be provided for the workflow to run
|
|
required: false
|
|
jobs:
|
|
build:
|
|
# The CMake configure and build commands are platform agnostic and should work equally
|
|
# well on Windows or Mac. You can convert this to a matrix build if you need
|
|
# cross-platform coverage.
|
|
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
FORCE_UPDATE: ${{ github.event.inputs.force_update }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: 'recursive'
|
|
|
|
- name: Update prebuilts
|
|
|
|
# Some projects don't allow in-source building, so create a separate build directory
|
|
# We'll use this as our working directory for all subsequent commands
|
|
run: pwsh tools/ci/update-prebuilts.ps1 ${{ github.event.inputs.build1k_rel_tag }}
|
|
|
|
- name: Create pull request
|
|
if: ${{ env.AX_PREBUILTS_NO_UPDATE != 'true' }}
|
|
id: cpr
|
|
uses: peter-evans/create-pull-request@v4
|
|
with:
|
|
token: ${{ secrets.AX_BOT_TOKEN }}
|
|
push-to-fork: axmol-bot/axmol
|
|
commit-message: Update thirdparty prebuilts to ${{ github.event.inputs.build1k_rel_tag }}
|
|
committer: 'GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>'
|
|
author: 'axmol-bot <axmol-bot@users.noreply.github.com>'
|
|
signoff: false
|
|
branch: 1kdist_${{ github.event.inputs.build1k_rel_tag }}
|
|
delete-branch: true
|
|
title: 'Update thirdparty prebuilts to ${{ github.event.inputs.build1k_rel_tag }}'
|
|
body: |
|
|
RT
|
|
- Auto-generated by [create-pull-request][1]
|
|
|
|
[1]: https://github.com/peter-evans/create-pull-request
|
|
labels: |
|
|
thirdparty
|
|
automated pr
|
|
pinned
|
|
assignees: axmol-bot
|
|
reviewers: halx99
|
|
milestone: '1.1.x'
|
|
draft: false
|
|
|
|
- name: Check outputs
|
|
if: ${{ steps.cpr.outputs.pull-request-number }}
|
|
run: |
|
|
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
|
|
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
|