Skip to content

chore: version bump to 18.0.0 #12

chore: version bump to 18.0.0

chore: version bump to 18.0.0 #12

---
#------------------------------------------------------------------------------
# Pull Request Workflow Controller.
#
# Triggers:
# - Called automatically on relevant actions performed on pull requests.
# - Can also be run manually by clicking the "Run workflow" button.
#
# Actions:
# - Use semantic release rules to determine if a new release will be published.
#
#------------------------------------------------------------------------------
name: Pull Request Controller
on:
workflow_dispatch:
# GitHub Copilot: The `pull_request` and `pull_request_target` are two different
# event types in GitHub Actions that trigger workflows when activity related
# to pull requests occurs.
# - `pull_request`: This event triggers a workflow run whenever a pull
# request is opened, synchronized, or closed. The workflow runs in the context of the
# pull request, meaning it has access to the code and environment variables of the head
# branch of the pull request. This is safe for pull requests within the same repository,
# but for pull requests from a fork, this could potentially expose sensitive information.
#
# - `pull_request_target`: This event is similar to `pull_request`, but it runs in the context
# of the base of the pull request, rather than the head. This means it has access to the code
# and environment variables of the base branch, not the head branch. This is safer for
# pull requests from forks, as it prevents the fork from accessing sensitive information
# in the base repository. However, it means the workflow does not have access to the code
# in the pull request by default. If you need to access the code in the pull request,
# you can use the `actions/checkout` action with the `ref` input
# set to `github.event.pull_request.head.ref`.
#
# In general, use `pull_request` for workflows that need to access the code in the pull request,
# and `pull_request_target` for workflows that need to be safe for pull requests from forks.
pull_request_target:
types: [opened, synchronize]
paths:
- "**.py"
- "**.js"
- "**.jsx"
- "**.requirements.txt"
- "**.package.json"
- "./tutork8s_deploy_tasks/**"
jobs:
check_for_pending_release:
name: test-semantic-release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
id: semantic
with:
dry_run: true
branches: |
[
'+([0-9])?(.{+([0-9]),x}).x',
'main',
'next',
'next-major',
{
name: 'beta',
prerelease: true
},
{
name: 'alpha',
prerelease: true
}
]
extra_plugins: |
@semantic-release/git
@semantic-release/changelog
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
- name: Test Outputs
if: steps.semantic.outputs.new_release_published == 'true'
run: |
echo ${{ steps.semantic.outputs.new_release_version }}
echo ${{ steps.semantic.outputs.new_release_major_version }}
echo ${{ steps.semantic.outputs.new_release_minor_version }}
echo ${{ steps.semantic.outputs.new_release_patch_version }}