This repository has been archived on 2025-10-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
MarkNow/.github/workflows/release-branch.yml
2023-07-07 15:47:19 -03:00

67 lines
1.6 KiB
YAML

name: 🦋 Release branch
on:
push:
branches:
- dev
pull_request:
branches:
- main
types:
- closed
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
update-release:
if: github.ref_name == 'dev'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
name: Update/Create release branch
env:
HUSKY: 0
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup environment
uses: ./.github/actions/pnpm-setup
- name: Update release PR
id: changesets
uses: loreddev/changeset-action@main
with:
branch: main
commit: 'ci: 👷🦋 version packages'
title: 🦋 Release branch
publish: pnpm run release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update-dev:
if: github.ref_name == 'main' && github.event.pull_request.merged == true && github.event.pull_request.title == '🦋 Release branch'
runs-on: ubuntu-latest
name: Update dev branch
timeout-minutes: 2
env:
HUSKY: 0
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Release to dev
uses: devmasx/merge-branch@master
with:
type: now
from_branch: changeset-release/main
target_branch: dev
message: 'ci: 👷 update dev branch'
github_token: ${{ secrets.GITHUB_TOKEN }}