Skip to content

docs: remove auto-assign status #55

docs: remove auto-assign status

docs: remove auto-assign status #55

Workflow file for this run

---
###############################################################################
# Workflow: Push to main
#
# Purpose:
# - Automates semantic release creation on pushes to the main branch.
# - Merges main into next, alpha, beta, and next-major branches to keep them up to date.
#
# Triggers:
# - On push to the main branch
# - Manual dispatch
#
# Key Steps:
# 1. Checkout repository code
# 2. Merge main into next, next-major, alpha, and beta branches using a custom action
# 3. Run semantic-release to publish new versions and changelogs
# 4. Push updates to the appropriate major version branch if a new release is published
#
# Notes:
# - Uses a custom merge-branch action for branch synchronization
# - Requires PAT (Personal Access Token) secret for authentication
# - Integrates with cycjimmy/semantic-release-action for automated releases
###############################################################################
name: Push to main
on:
workflow_dispatch:
push:
branches:
- main
jobs:
merge-main-to-dev-branches:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
steps:
- name: Checkout code
id: checkout
uses: actions/checkout@v6
- name: Merge main into next
uses: ./.github/actions/merge-branch
with:
github-token: ${{ env.GITHUB_TOKEN }}
source-branch: main
target-branch: next
- name: Merge main into next-major
uses: ./.github/actions/merge-branch
with:
github-token: ${{ env.GITHUB_TOKEN }}
source-branch: main
target-branch: next-major
- name: Merge main into alpha
uses: ./.github/actions/merge-branch
with:
github-token: ${{ env.GITHUB_TOKEN }}
source-branch: main
target-branch: alpha
- name: Merge main into beta
uses: ./.github/actions/merge-branch
with:
github-token: ${{ env.GITHUB_TOKEN }}
source-branch: main
target-branch: beta
semantic-release:
needs: merge-main-to-dev-branches
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
steps:
- uses: actions/checkout@v6
id: checkout
with:
persist-credentials: false
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v6
id: semantic
with:
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
@semantic-release/exec
env:
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
- name: Publish To GitHub Package Registry
id: publish
if: steps.semantic.outputs.new_release_published == 'true'
run: echo "new release was published"
shell: bash
- name: Push updates to branch for major version
id: push_major
if: steps.semantic.outputs.new_release_published == 'true'
run: "git push https://x-access-token:${{ env.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git HEAD:refs/heads/v${{steps.semantic.outputs.new_release_major_version}}"
shell: bash