Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Release
on:
issue_comment:
types: [created, deleted]
push:
branches:
- main
jobs:
check:
runs-on: ubuntu-latest
name: Context check
outputs:
continue: ${{ steps.check.outputs.continue }}
workflow: ${{ steps.check.outputs.workflow }}
steps:
- name: Checkout the repository
uses: actions/checkout@v7
- name: Install pnpm
uses: pnpm/action-setup@v6
with:
version: 11
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Context check
id: check
uses: ./
with:
workflow: check
github-token: ${{ secrets.GITHUB_TOKEN }}
Comment thread
Copilot marked this conversation as resolved.
pull-request:
runs-on: ubuntu-latest
name: Pull request
needs: check
if: needs.check.outputs.workflow == 'pull-request'
steps:
- name: Checkout the repository
uses: actions/checkout@v7
- name: Install pnpm
uses: pnpm/action-setup@v6
with:
version: 11
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Create or update pull request
uses: ./
with:
workflow: pull-request
github-token: ${{ secrets.GITHUB_TOKEN }}
release:
Comment thread
dangreen marked this conversation as resolved.
runs-on: ubuntu-latest
name: Release
needs: check
if: needs.check.outputs.workflow == 'release'
steps:
- name: Checkout the repository
uses: actions/checkout@v7
- name: Install pnpm
uses: pnpm/action-setup@v6
with:
version: 11
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --config.node-linker=hoisted
- name: Release
uses: ./
with:
workflow: release
github-token: ${{ secrets.GITHUB_TOKEN }}
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,11 @@ coverage
tmp

# Dependency directory
node_modules/.bin
node_modules

# Staff
.vite*
.codex
.agents
skills-lock.json

6 changes: 6 additions & 0 deletions .simple-release.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"project": "@simple-release/node-gha#NodeGhaProject",
"releaser": {
"verbose": true
}
}
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
nodejs 20.17.0
npm 11.4.1
pnpm 11.9.0
nodejs 24.17.0
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ Workflow to run.
- `full`: create PR with release changes and release on merge (default)
- `pull-request`: create PR with release changes
- `release`: run release on release commit
- `snapshot`: publish a temporary snapshot version
- `check`: run context check to skip unnecessary runs (e.g. on issue_comment) and determines workflow to run

### github-token
Expand All @@ -154,3 +155,52 @@ Generic token to use in config file. Passed to `PUBLISH_TOKEN` env variable.
### branch

Branch to store release changes and create pull request from. Defaults to `simple-release`.

### bump-version

Force set specific version.

### bump-as

Release type. One of `major`, `minor`, `patch`, or `prerelease`.

### bump-prerelease

Pre-release identifier (e.g., `alpha`, `beta`).

### bump-snapshot

Snapshot pre-release identifier.

### bump-first-release

Whether this is the first release. Accepts `true` or `false`.

### bump-skip

Skip version bump. Accepts `true` or `false`.

### bump-by-project

JSON object with per-project bump options for monorepos.

```yaml
with:
bump-by-project: '{"pkg-a":{"as":"minor"},"pkg-b":{"skip":true}}'
```

### maintenance-branch

Create maintenance branches for previous major versions. Accepts `true` or `false`.

### publish-skip

Skip publishing. Accepts `true` or `false`.

### publish-access

Package access level. One of `public` or `restricted`.

### publish-tag

Tag for npm publication.
25 changes: 24 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ inputs:
- full: create PR with release changes and release on merge (default)
- pull-request: create PR with release changes
- release: run release on release commit
- snapshot: publish a temporary snapshot version
- check: run context check to skip unnecessary runs (e.g. on issue_comment) and determines workflow to run
default: 'full'
github-token:
Expand All @@ -20,13 +21,35 @@ inputs:
branch:
description: Branch to store release changes and create pull request from.
default: simple-release
bump-version:
description: Force set specific version.
bump-as:
description: Release type. One of 'major', 'minor', 'patch', or 'prerelease'.
bump-prerelease:
description: Pre-release identifier (e.g., "alpha", "beta").
bump-snapshot:
description: Snapshot pre-release identifier.
bump-first-release:
description: Whether this is the first release.
bump-skip:
description: Skip version bump.
bump-by-project:
description: JSON object with per-project bump options for monorepos.
maintenance-branch:
description: Create maintenance branches for previous major versions.
publish-skip:
description: Skip publishing.
publish-access:
description: Package access level. One of 'public' or 'restricted'.
publish-tag:
description: Tag for npm publication.
outputs:
continue:
description: Outputs 'true' when the 'check' workflow determines the context is appropriate.
workflow:
description: The workflow to run based on the context.
runs:
using: node20
using: node24
main: src/index.js
Comment thread
dangreen marked this conversation as resolved.
branding:
icon: send
Expand Down
Loading