Skip to content

Commit df63a27

Browse files
authored
[skip ci] feat: ability to bypass releasee with commit message (#209)
1 parent f71e653 commit df63a27

File tree

4 files changed

+25
-7
lines changed

4 files changed

+25
-7
lines changed

.changeset/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{ "repo": "rehype-pretty/rehype-pretty-code" }
66
],
77
"commit": false,
8-
"fixed": [],
8+
"fixed": [["rehype-pretty-code", "@rehype-pretty/transformers"]],
99
"linked": [],
1010
"access": "public",
1111
"baseBranch": "master",

.github/workflows/release.yml

+22-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@ name: Release
22

33
on:
44
push:
5-
branches: ['main', 'next']
5+
branches:
6+
- master
7+
- next
68

79
defaults:
810
run:
911
shell: bash
1012

11-
concurrency: ${{ github.workflow }}-${{ github.ref }}
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
1217

1318
env:
1419
ACTIONS_RUNNER_DEBUG: true
@@ -20,6 +25,7 @@ env:
2025
jobs:
2126
release:
2227
name: 'Release'
28+
if: github.repository == 'rehype-pretty/rehype-pretty-code' && !contains(github.event.head_commit.message, '[skip ci]')
2329
runs-on: ['ubuntu-latest']
2430
permissions:
2531
contents: write
@@ -28,6 +34,7 @@ jobs:
2834
- name: 'Checkout Repository'
2935
uses: actions/checkout@v4
3036

37+
3138
- name: 'Get pnpm Version'
3239
id: pnpm-version
3340
run: |
@@ -47,10 +54,21 @@ jobs:
4754
registry-url: 'https://registry.npmjs.org'
4855

4956
- name: 'Install Dependencies'
50-
run: pnpm install
57+
run: pnpm install --frozen-lockfile
58+
59+
- name: Check for unreleased changesets
60+
id: has-changesets
61+
uses: andstor/file-existence-action@v3
62+
with:
63+
files: ".changeset/!(README).md"
5164

5265
- name: 'Build Packages'
53-
run: pnpm build
66+
if: steps.has-changesets.outputs.files_exists == 'true'
67+
run: |
68+
pnpm lint && pnpm format
69+
pnpm typecheck
70+
pnpm test
71+
pnpm build
5472
5573
- name: Create Release Pull Request or Publish
5674
id: changesets

packages/core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rehype-pretty-code",
3-
"version": "0.13.2",
3+
"version": "0.13.1",
44
"description": "Beautiful code for your MD/MDX docs.",
55
"homepage": "https://rehype-pretty.pages.dev",
66
"type": "module",

packages/transformers/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@rehype-pretty/transformers",
33
"description": "Shiki transformer that adds a copy button to code blocks",
4-
"version": "0.13.2",
4+
"version": "0.13.1",
55
"homepage": "https://rehype-pretty.pages.dev",
66
"private": true,
77
"type": "module",

0 commit comments

Comments
 (0)