Skip to content

Merge pull request #22 from cookiecutter-openedx/dependabot/npm_and_y… #26

Merge pull request #22 from cookiecutter-openedx/dependabot/npm_and_y…

Merge pull request #22 from cookiecutter-openedx/dependabot/npm_and_y… #26

Workflow file for this run

---
#---------------------------------------------------------
# - Create a semantical release
# - Merge main into next, alpha, beta, and next-major
#---------------------------------------------------------
name: Push to main
on:
workflow_dispatch:
push:
branches:
- main
jobs:
semantic-release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
steps:
- uses: actions/checkout@v4
id: checkout
with:
persist-credentials: false
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
id: semantic
with:
branches: |
[
'+([0-9])?(.{+([0-9]),x}).x',
'main'
]
extra_plugins: |
@semantic-release/git
@semantic-release/changelog
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