Skip to content

Deprecated: [CI] Add CircleCI Pipelines #10

Deprecated: [CI] Add CircleCI Pipelines

Deprecated: [CI] Add CircleCI Pipelines #10

Workflow file for this run

name: release
on:
push:
branches:
- main
tags:
- 'v*.*.*'
pull_request:
types:
- labeled
permissions:
contents: write
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
- id: filter
uses: dorny/paths-filter@v3
with:
filters: |
blender:
- 'src/XRFeitoriaBpy/*'
unreal:
- 'src/XRFeitoriaUnreal/*'
- name: Determine next version
run: |
# Get the next version from the previous step
VERSION="${{ steps.bumpr.outputs.next_version }}"
if [ -z "$VERSION" ]; then
echo "No version bump needed."
exit 0
fi
# Git configuration
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git tag -a "$VERSION" -m "Release $VERSION"
pip install .
# Update plugin info
if ${{ steps.filter.outputs.blender == 'true' }}; then
python -m xrfeitoria.utils.publish_plugins update-bpy-version
fi
if ${{ steps.filter.outputs.unreal == 'true' }}; then
python -m xrfeitoria.utils.publish_plugins update-uplugin-version
fi
python -m xrfeitoria.utils.publish_plugins update-plugin-info
git add .
git commit -m "[bot] Update plugin info"
git push origin HEAD:${{ github.head_ref }}