Condition #50
Workflow file for this run
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: release | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v*.*.*' | |
pull_request: | |
types: | |
- labeled | |
jobs: | |
release: | |
if: github.event.action != 'labeled' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Bump version on merging Pull Requests with specific labels. | |
# (bump:major,bump:minor,bump:patch) | |
- id: bumpr | |
if: "!startsWith(github.ref, 'refs/tags/')" | |
uses: haya14busa/action-bumpr@v1 | |
# Get tag name. | |
- id: tag | |
uses: haya14busa/action-cond@v1 | |
with: | |
cond: "${{ startsWith(github.ref, 'refs/tags/') }}" | |
if_true: ${{ github.ref }} | |
if_false: ${{ steps.bumpr.outputs.next_version }} | |
release-check: | |
if: github.event.action == 'labeled' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- id: bumpr | |
name: Post bumpr status comment | |
uses: haya14busa/action-bumpr@v1 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
- name: Prepare Dependencies | |
run: | | |
VERSION="${{ steps.bumpr.outputs.next_version }}" | |
git config user.name "[bot]github-actions" | |
git config user.email "41898282+[bot][email protected]" | |
# Checkout to PR branch | |
git checkout ${{ github.head_ref }} | |
git tag -a "$VERSION" -m "Release $VERSION" | |
pip install . | |
- name: Update Blender Addon Version | |
if: "contains(github.event.pull_request.changed_files, 'src/XRFeitoriaBpy/*')" | |
run: python -m xrfeitoria.utils.publish_plugins update-uplugin-version | |
- name: Update Unreal Plugin Version | |
if: "contains(github.event.pull_request.changed_files, 'src/XRFeitoriaUnreal/*')" | |
run: python -m xrfeitoria.utils.publish_plugins update-uplugin-version | |
- name: Update Python Package Version & Commit | |
run: | | |
python -m xrfeitoria.utils.publish_plugins update-plugin-info | |
git add . | |
git commit -m "[bot] Update plugin info" | |
git push origin ${{ github.head_ref }} |