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
41 changes: 28 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,38 @@
name: Release to npm
# For every push to the primary branch with .release-plan.json modified,
# runs release-plan.

name: Publish Stable

on:
release:
types: [created]
workflow_dispatch:
push:
branches:
- main
- master
paths:
- '.release-plan.json'

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

jobs:
publish:
name: "Release"
name: "NPM Publish"
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
attestations: write

steps:
- uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version: 18.x
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
- run: npm publish
node-version: 22
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- name: Publish to NPM
run: npx release-plan publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Changelog
33 changes: 25 additions & 8 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
This addon is setup to publish to npm when GitHub release gets created, see [publish](./.github/workflows/publish.yml)
GitHub workflow.
# Release Process

Hence, sequence of steps should be:
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.

- `GITHUB_AUTH=abc npx lerna-changelog` to create changelog
- `npm version [major | minor | patch]` to tag the release
- `git push` to push code changes
- `git push origin tag <tag_name>` to push the git tag
- Create new GitHub release from newly published tag https://github.com/embermap/ember-cli-fastboot-testing/releases/new
## Preparation

Since the majority of the actual release process is automated, the remaining tasks before releasing are:

- correctly labeling **all** pull requests that have been merged since the last release
- updating pull request titles so they make sense to our users

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.

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 - Internal changes or things that don't fit in any other category.

**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`

## Release

Once the prep work is completed, the actual release is straight forward: you just need to merge the open [Plan Release](https://github.com/embermap/ember-cli-fastboot-testing/pulls?q=is%3Apr+is%3Aopen+%22Prepare+Release%22+in%3Atitle) PR
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"prettier": "^3.3.3",
"qunit": "^2.22.0",
"qunit-dom": "^3.2.1",
"release-plan": "^0.17.2",
"semver": "^7.6.3",
"stylelint": "^15.11.0",
"stylelint-config-standard": "^34.0.0",
Expand All @@ -106,6 +107,10 @@
"engines": {
"node": "18.* || 20.* || >= 22"
},
"volta": {
"node": "18.20.4",
"yarn": "1.22.22"
},
"ember": {
"edition": "octane"
},
Expand All @@ -118,8 +123,5 @@
},
"fastbootDependencies": [
"crypto"
],
"volta": {
"node": "18.20.4"
}
]
}
Loading
Loading