[go: nahoru, domu]

Skip to content

Commit

Permalink
[skip ci] feat: ability to bypass releasee with commit message (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
o-az committed May 8, 2024
1 parent f71e653 commit df63a27
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{ "repo": "rehype-pretty/rehype-pretty-code" }
],
"commit": false,
"fixed": [],
"fixed": [["rehype-pretty-code", "@rehype-pretty/transformers"]],
"linked": [],
"access": "public",
"baseBranch": "master",
Expand Down
26 changes: 22 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ name: Release

on:
push:
branches: ['main', 'next']
branches:
- master
- next

defaults:
run:
shell: bash

concurrency: ${{ github.workflow }}-${{ github.ref }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


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


- name: 'Get pnpm Version'
id: pnpm-version
run: |
Expand All @@ -47,10 +54,21 @@ jobs:
registry-url: 'https://registry.npmjs.org'

- name: 'Install Dependencies'
run: pnpm install
run: pnpm install --frozen-lockfile

- name: Check for unreleased changesets
id: has-changesets
uses: andstor/file-existence-action@v3
with:
files: ".changeset/!(README).md"

- name: 'Build Packages'
run: pnpm build
if: steps.has-changesets.outputs.files_exists == 'true'
run: |
pnpm lint && pnpm format
pnpm typecheck
pnpm test
pnpm build
- name: Create Release Pull Request or Publish
id: changesets
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rehype-pretty-code",
"version": "0.13.2",
"version": "0.13.1",
"description": "Beautiful code for your MD/MDX docs.",
"homepage": "https://rehype-pretty.pages.dev",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/transformers/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@rehype-pretty/transformers",
"description": "Shiki transformer that adds a copy button to code blocks",
"version": "0.13.2",
"version": "0.13.1",
"homepage": "https://rehype-pretty.pages.dev",
"private": true,
"type": "module",
Expand Down

0 comments on commit df63a27

Please sign in to comment.