ci: 👷 simplified release branch workflow
This commit is contained in:
23
.github/workflows/release-branch.yml
vendored
23
.github/workflows/release-branch.yml
vendored
@@ -4,11 +4,6 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
types:
|
||||
- closed
|
||||
|
||||
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
||||
@@ -38,23 +33,13 @@ jobs:
|
||||
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
|
||||
- name: Update dev branch
|
||||
if: steps.changesets.outputs.hasChangesets == 'false'
|
||||
uses: devmasx/merge-branch@master
|
||||
with:
|
||||
type: now
|
||||
|
||||
34
.github/workflows/release.yml
vendored
34
.github/workflows/release.yml
vendored
@@ -1,34 +0,0 @@
|
||||
name: 🎉 Release
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows:
|
||||
- 🧪 Code checking
|
||||
types:
|
||||
- completed
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
release:
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' && github.repository == 'loreddev/marknow' }}
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
name: Release
|
||||
env:
|
||||
HUSKY: 0
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup environment
|
||||
uses: ./.github/actions/pnpm-setup
|
||||
|
||||
- name: Release packages
|
||||
run: pnpm run release
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
Reference in New Issue
Block a user