🔖 Update to 0.1.0 #9
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: PR Automation Workflow | |
on: | |
pull_request: | |
branches: | |
- main | |
- dev | |
- release/* | |
- fix/* | |
jobs: | |
check-updates: | |
runs-on: ubuntu-latest | |
if: contains(github.head_ref, 'fix/') || contains(github.head_ref, 'release/') | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
package: | |
- 'package.json' | |
changelog: | |
- 'CHANGELOG.md' | |
- name: Fail if package.json or CHANGELOG.md are not updated | |
if: ${{ !steps.changes.outputs.package && !steps.changes.outputs.changelog }} | |
run: | | |
echo "package.json and CHANGELOG.md must be updated in this PR." | |
exit 1 | |
auto-create-pr-to-dev-main: | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.base.ref == 'main' && contains(github.head_ref, 'release/') | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Auto-create PR to dev for release branches | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
branch: sync-${{ github.head_ref }}-to-dev | |
base: dev | |
title: "[AUTO] Sync ${{ github.head_ref }} to dev" | |
body: "Automated PR to sync changes from ${{ github.head_ref }} to dev." | |
token: ${{ secrets.GITHUB_TOKEN }} | |
mirror-fix-to-dev: | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.base.ref == 'main' && contains(github.head_ref, 'fix/') | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Auto-create PR to dev for fix branches | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
branch: sync-${{ github.head_ref }}-to-dev | |
base: dev | |
title: "[AUTO] Sync ${{ github.head_ref }} to dev" | |
body: "Automated PR to sync changes from ${{ github.head_ref }} to dev." | |
token: ${{ secrets.GITHUB_TOKEN }} |