pocketmine_mp_post_release #10
This file contains 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: PocketMine-MP post-release | |
on: | |
repository_dispatch: | |
types: pocketmine_mp_post_release | |
jobs: | |
post-release: | |
name: Update version info post-release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout RestrictedActions | |
uses: actions/checkout@v4 | |
- name: Generate access token | |
id: token | |
uses: actions/create-github-app-token@v1 | |
with: | |
app-id: ${{ vars.RESTRICTED_ACTIONS_APP_ID }} | |
private-key: ${{ secrets.RESTRICTED_ACTIONS_APP_KEY }} | |
owner: ${{ github.repository_owner }} | |
repositories: PocketMine-MP | |
- name: Checkout PocketMine-MP | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.repository_owner }}/PocketMine-MP # to allow testing on forks without editing the workflow | |
fetch-depth: 0 | |
token: ${{ steps.token.outputs.token }} | |
ref: ${{ github.event.client_payload.branch }} | |
path: ${{ github.workspace }}/pocketmine-mp | |
- name: Get GitHub App User ID | |
id: get-user-id | |
run: echo "user-id=$(gh api "/users/${{ steps.token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT" | |
env: | |
GH_TOKEN: ${{ steps.token.outputs.token }} | |
- name: Set Git config | |
working-directory: ${{ github.workspace }}/pocketmine-mp | |
run: | | |
git config user.name '${{ steps.token.outputs.app-slug }}[bot]' | |
git config user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.token.outputs.app-slug }}[bot]@users.noreply.github.com' | |
- name: Run version bump script | |
working-directory: ${{ github.workspace }}/pocketmine-mp | |
run: | | |
"${{ github.workspace }}/.github/workflows/bump-version-post-release.sh" ./ "Commit created by: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
- name: Push changes | |
working-directory: ${{ github.workspace }}/pocketmine-mp | |
run: git push | |