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
21 changes: 0 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,24 +179,3 @@ jobs:
- name: Type checking
run: tsc --noEmit
working-directory: test-types

publish-config:
name: Publish config
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 22.x

- name: Check workspaces property
run: |
if [ "$(npm pkg get workspaces | jq '. | length')" -eq 0 ]; then
echo "You removed "workspaces" key in root package.json that is used during publish process. Please bring it back." && \
exit 1
fi
61 changes: 61 additions & 0 deletions .github/workflows/plan-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Plan Release
on:
workflow_dispatch:
push:
branches:
- main
- master
pull_request_target: # This workflow has permissions on the repo, do NOT run code from PRs in this workflow. See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
types:
- labeled
- unlabeled

concurrency:
group: plan-release # only the latest one of these should ever be running
cancel-in-progress: true

jobs:
should-run-release-plan-prepare:
name: Should we run release-plan prepare?
runs-on: ubuntu-latest
outputs:
should-prepare: ${{ steps.should-prepare.outputs.should-prepare }}
steps:
- uses: release-plan/actions/should-prepare-release@v1
with:
ref: 'master'
id: should-prepare

create-prepare-release-pr:
name: Create Prepare Release PR
runs-on: ubuntu-latest
timeout-minutes: 5
needs: should-run-release-plan-prepare
permissions:
contents: write
issues: read
pull-requests: write
if: needs.should-run-release-plan-prepare.outputs.should-prepare == 'true'
steps:
- uses: release-plan/actions/prepare@v1
name: Run release-plan prepare
with:
ref: 'master'
env:
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
id: explanation

- uses: peter-evans/create-pull-request@v8
name: Create Prepare Release PR
with:
commit-message: "Prepare Release ${{ steps.explanation.outputs.new-version}} using 'release-plan'"
labels: "internal"
sign-commits: true
branch: release-preview
title: Prepare Release ${{ steps.explanation.outputs.new-version }}
body: |
This PR is a preview of the release that [release-plan](https://github.com/embroider-build/release-plan) has prepared. To release you should just merge this PR 👍

-----------------------------------------

${{ steps.explanation.outputs.text }}
54 changes: 25 additions & 29 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,40 @@
name: Publish
# For every push to the primary branch with .release-plan.json modified,
# runs release-plan.

name: Publish Stable

on:
workflow_dispatch:
push:
branches:
- main
- master
tags:
- v*
paths:
- '.release-plan.json'

concurrency:
group: publish-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
publish:
name: Publish
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
name: "NPM Publish"
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
attestations: write

steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Install Node
uses: actions/setup-node@v4
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: 22.x
cache: 'pnpm'
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable
node-version: 24
registry-url: 'https://registry.npmjs.org'

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

# We need a workspace aware version of npm because our addon is in a subdir but our .npmrc is in the root
- name: npm8
run: npm install -g npm@8

# We need a workspace aware version of npm because our addon is in a subdir but our .npmrc is in the root
- name: copy .md files
run: cp README.md LICENSE.md CHANGELOG.md addon/

- name: npm publish
run: npm publish --tag=latest --verbose --workspace=addon
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Publish to NPM
run: NPM_CONFIG_PROVENANCE=true pnpm release-plan publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
# dependencies
node_modules/

# *.md copies from release
/addon/README.md
/addon/LICENSE.md

# misc
.env*
.eslintcache
Expand Down
10 changes: 1 addition & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@









# Changelog

## v2.2.0 (2025-05-17)

Expand Down
68 changes: 15 additions & 53 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,27 @@
# Release Process

Releases are mostly automated using
[release-it](https://github.com/release-it/release-it/) and
[lerna-changelog](https://github.com/lerna/lerna-changelog/).
Releases in this repo are mostly automated using [release-plan](https://github.com/embroider-build/release-plan/). Once you label all your PRs correctly (see below) you will have an automatically generated PR that updates your CHANGELOG.md file and a `.release-plan.json` that is used to prepare the release once the PR is merged.

## Preparation

Since the majority of the actual release process is automated, the primary
remaining task prior to releasing is confirming that all pull requests that
have been merged since the last release have been labeled with the appropriate
`lerna-changelog` labels and the titles have been updated to ensure they
represent something that would make sense to our users. Some great information
on why this is important can be found at
[keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall
guiding principle here is that changelogs are for humans, not machines.

When reviewing merged PR's the labels to be used are:

* breaking - Used when the PR is considered a breaking change.
* enhancement - Used when the PR adds a new feature or enhancement.
* bug - Used when the PR fixes a bug included in a previous release.
* documentation - Used when the PR adds or updates documentation.
* internal - Used for internal changes that still require a mention in the
changelog/release notes.

## Release

Once the prep work is completed, the actual release is straight forward:
Since the majority of the actual release process is automated, the remaining tasks before releasing are:

* First, ensure that you have installed your projects dependencies:
- correctly labeling **all** pull requests that have been merged since the last release
- updating pull request titles so they make sense to our users

```sh
pnpm install
```

* Second, ensure that you have obtained a
[GitHub personal access token][generate-token] with the `repo` scope (no
other permissions are needed). Make sure the token is available as the
`GITHUB_AUTH` environment variable.

For instance:

```bash
export GITHUB_AUTH=abc123def456
```

[generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable
Some great information on why this is important can be found at [keepachangelog.com](https://keepachangelog.com/en/1.1.0/), but the overall
guiding principle here is that changelogs are for humans, not machines.

* And last (but not least 😁) do your release.
When reviewing merged PR's the labels to be used are:

```sh
pnpm release
```
- breaking - Used when the PR is considered a breaking change.
- enhancement - Used when the PR adds a new feature or enhancement.
- bug - Used when the PR fixes a bug included in a previous release.
- documentation - Used when the PR adds or updates documentation.
- internal - Internal changes or things that don't fit in any other category.

[release-it](https://github.com/release-it/release-it/) manages the actual
release process. It will prompt you to choose the version number after which
you will have the chance to hand tweak the changelog to be used (for the
`CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging,
pushing the tag and commits, etc.
**Note:** `release-plan` requires that **all** PRs are labeled. If a PR doesn't fit in a category it's fine to label it as `internal`

## Unstable Tag
## Release

For every push to the master branch, [`push-dist`](./.github/workflows/push-dist.yml)
places the compiled assets on a "dist" branch.
Once the prep work is completed, the actual release is straight forward: you just need to merge the open [Plan Release](https://github.com/ember-animation/ember-animated/pulls?q=is%3Apr+is%3Aopen+%22Prepare+Release%22+in%3Atitle) PR
1 change: 1 addition & 0 deletions addon/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# The authoritative copies of these live in the monorepo root (because they're
# more useful on github that way), but the build copies them into here so they
# will also appear in published NPM packages.
/CHANGELOG.md
/README.md
/LICENSE.md

Expand Down
10 changes: 10 additions & 0 deletions addon/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { babel } from '@rollup/plugin-babel';
import copy from 'rollup-plugin-copy';
import { Addon } from '@embroider/addon-dev/rollup';

const addon = new Addon({
Expand Down Expand Up @@ -69,5 +70,14 @@ export default {

// Remove leftover build artifacts when starting a new build.
addon.clean(),

// Copy Readme and License into published package
copy({
targets: [
{ src: '../CHANGELOG.md', dest: '.' },
{ src: '../README.md', dest: '.' },
{ src: '../LICENSE.md', dest: '.' },
],
}),
],
};
54 changes: 10 additions & 44 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,73 +1,39 @@
{
"version": "2.2.0",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/ember-animation/ember-animated.git"
},
"workspaces": [
"addon",
"docs",
"test-app"
],
"scripts": {
"build": "pnpm --filter ember-animated build",
"lint": "pnpm --filter '*' lint",
"lint:fix": "pnpm --filter '*' lint:fix",
"prepare": "pnpm build",
"release": "release-it",
"start": "concurrently 'pnpm:start:*' --restart-after 5000 --prefixColors auto",
"start:addon": "pnpm --filter ember-animated start --no-watch.clearScreen",
"start:test-app": "pnpm --filter test-app start",
"test": "pnpm --filter '*' test",
"test:ember": "pnpm --filter '*' test:ember"
},
"devDependencies": {
"@glint/core": "^1.2.1",
"concurrently": "^9.1.2",
"release-plan": "^0.18.0"
},
"packageManager": "pnpm@10.6.3",
"volta": {
"node": "22.14.0",
"pnpm": "10.6.3"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"packageManager": "pnpm@10.6.3",
"devDependencies": {
"@glint/core": "^1.2.1",
"@release-it-plugins/lerna-changelog": "^7.0.0",
"@release-it-plugins/workspaces": "^4.2.0",
"concurrently": "^9.1.2",
"release-it": "^17.10.0"
},
"pnpm": {
"overrides": {
"@types/eslint": "8.4.1",
"ember-animated-tools>ember-animated": "workspace:*",
"ember-modal-dialog": "4.0.0",
"@types/eslint": "8.4.1"
"ember-modal-dialog": "4.0.0"
}
},
"release-it": {
"hooks": {
"after:bump": "pnpm install",
"after:release": "cd docs && pnpm run deploy"
},
"plugins": {
"@release-it-plugins/lerna-changelog": {
"infile": "CHANGELOG.md",
"launchEditor": true
},
"@release-it-plugins/workspaces": {
"publish": false,
"workspaces": [
"addon"
]
}
},
"git": {
"tagName": "v${version}"
},
"github": {
"release": true,
"tokenRef": "GITHUB_AUTH"
},
"npm": false
},
"version": "2.2.0"
}
}
Loading
Loading