Skip to content

Commit c81e1ee

Browse files
authored
ci(release-please): implement Release-Please for changelog (#17)
This package will also upload npm packages, once configured
1 parent b20db94 commit c81e1ee

File tree

8 files changed

+133
-10
lines changed

8 files changed

+133
-10
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@ updates:
99
directory: '/' # Location of package manifests
1010
commit-message:
1111
prefix: 'build'
12-
include: 'scope'
1312
rebase-strategy: 'auto'
1413
schedule:
1514
interval: 'daily'
1615
- package-ecosystem: 'github-actions' # See documentation for possible values
1716
directory: '/' # Location of package manifests
1817
commit-message:
19-
prefix: 'ci'
20-
include: 'scope'
18+
prefix: 'ci(actions)'
2119
rebase-strategy: 'auto'
2220
schedule:
23-
interval: 'daily'
21+
interval: 'daily'

.github/workflows/release-please.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: release-please
2+
on:
3+
push:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
jobs:
11+
release-please:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: google-github-actions/release-please-action@v3
15+
id: release
16+
with:
17+
command: manifest
18+
release-type: node
19+
package-name: highlightjs-apex
20+
# The logic below handles the npm publication:
21+
- name: Checkout Repository
22+
# these if statements ensure that a publication only occurs when
23+
# a new release is created:
24+
if: ${{ steps.release.outputs.releases_created }}
25+
uses: actions/checkout@v4
26+
- name: Setup Node
27+
uses: actions/setup-node@v4
28+
if: ${{ steps.release.outputs.releases_created }}
29+
with:
30+
node-version: 18
31+
registry-url: 'https://registry.npmjs.org'
32+
- name: Build Packages
33+
if: ${{ steps.release.outputs.releases_created }}
34+
run: |
35+
npm install
36+
npx lerna bootstrap
37+
38+
# Release Please has already incremented versions and published tags, so we just
39+
# need to publish all unpublished versions to NPM here
40+
# See: https://github.com/lerna/lerna/tree/main/commands/publish#bump-from-package
41+
#- name: Publish to NPM
42+
# if: ${{ steps.release.outputs.releases_created }}
43+
# env:
44+
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
45+
# run: npx lerna publish from-package --no-push --no-private --yes

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,8 @@ typings/
104104
.tern-port
105105

106106
# OSX file
107-
.DS_Store
107+
.DS_Store
108+
109+
# no idea why sfdx is in this repo, but excluding those folders
110+
.sfdx
111+
.sf

.npmignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
assets
2-
demo
2+
demo
3+
.github
4+
.vscode
5+
node_modules,
6+
.release-please-manifest.json
7+
release-please-config.json

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "1.2.1"
3+
}

HISTORY.md renamed to CHANGELOG.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,36 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased](https://github.com/highlightjs/highlightjs-apex/compare/v1.2.0...HEAD)
8+
## [Unreleased](https://github.com/highlightjs/highlightjs-apex/compare/v1.2.1...HEAD)
99

10-
## [v1.2.0](https://github.com/highlightjs/highlightjs-apex/compare/v1.1.0...v1.2.0) - 2023-03-29
10+
### Merged
11+
12+
- build(deps): bump highlight.js from 11.8.0 to 11.9.0 [`#15`](https://github.com/highlightjs/highlightjs-apex/pull/15)
13+
- ci(deps): bump actions/checkout from 3 to 4 [`#14`](https://github.com/highlightjs/highlightjs-apex/pull/14)
14+
- build(deps-dev): bump prettier from 3.0.2 to 3.0.3 [`#13`](https://github.com/highlightjs/highlightjs-apex/pull/13)
15+
- build(deps-dev): bump prettier from 3.0.1 to 3.0.2 [`#12`](https://github.com/highlightjs/highlightjs-apex/pull/12)
16+
- build: include highlight.js as dependency [`#11`](https://github.com/highlightjs/highlightjs-apex/pull/11)
17+
- build(deps-dev): bump prettier from 3.0.0 to 3.0.1 [`#10`](https://github.com/highlightjs/highlightjs-apex/pull/10)
18+
- build(deps-dev): bump prettier from 2.8.8 to 3.0.0 [`#9`](https://github.com/highlightjs/highlightjs-apex/pull/9)
19+
- build(deps-dev): bump highlight.js from 11.7.0 to 11.8.0 [`#8`](https://github.com/highlightjs/highlightjs-apex/pull/8)
20+
- build(deps-dev): bump prettier from 2.8.7 to 2.8.8 [`#7`](https://github.com/highlightjs/highlightjs-apex/pull/7)
21+
22+
### Commits
23+
24+
- begin npm setup [`284b7df`](https://github.com/highlightjs/highlightjs-apex/commit/284b7dff2a4008f749b7852d1dad08a04680e9f1)
25+
- chore: bootstrap releases for path: . [`4b448d9`](https://github.com/highlightjs/highlightjs-apex/commit/4b448d98734b7139ce6433bf4a7ac9a2c865fc74)
26+
- chore: npm version 1.2.0 [`a5e6378`](https://github.com/highlightjs/highlightjs-apex/commit/a5e637896f9065a3e9d33017ec4afe397da3a9ce)
27+
28+
## [v1.2.1](https://github.com/highlightjs/highlightjs-apex/compare/v1.2.0...v1.2.1) - 2023-03-29
29+
30+
### Commits
31+
32+
- docs(changelog): update changelog v1.2.0 [`3144fae`](https://github.com/highlightjs/highlightjs-apex/commit/3144faef9f59a5a76ece758a32e9e9ad1c627064)
33+
- chore: update package.json to v1.2.0 [`e2af1e6`](https://github.com/highlightjs/highlightjs-apex/commit/e2af1e67e63a2645faa9b75eb1fbf47a19b3b79b)
34+
35+
## [v1.2.0](https://github.com/highlightjs/highlightjs-apex/compare/v1.1.1...v1.2.0) - 2023-03-29
36+
37+
## [v1.1.1](https://github.com/highlightjs/highlightjs-apex/compare/v1.1.0...v1.1.1) - 2023-03-29
1138

1239
### Merged
1340

@@ -19,6 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1946

2047
- Create codeql.yml [`8f1af08`](https://github.com/highlightjs/highlightjs-apex/commit/8f1af08fa31f515393cc73ae9f29fa53d6b6eb42)
2148
- Create dependabot.yml [`c5da832`](https://github.com/highlightjs/highlightjs-apex/commit/c5da8326601a3c8feff1fb835ff4011c968a6135)
49+
- docs(changelog): update changelog v1.2.0 [`3144fae`](https://github.com/highlightjs/highlightjs-apex/commit/3144faef9f59a5a76ece758a32e9e9ad1c627064)
2250
- Readme typo [`faf2998`](https://github.com/highlightjs/highlightjs-apex/commit/faf2998257fbfa87cbe1a7138b2a0d32b8e7dcfa)
2351

2452
## [v1.1.0](https://github.com/highlightjs/highlightjs-apex/compare/v1.0.0...v1.1.0) - 2022-06-02

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "highlightjs-apex",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "Apex Language of Salesforce highlighting plugin for highlight.js",
55
"main": "src/languages/apex.js",
66
"scripts": {
@@ -14,7 +14,7 @@
1414
"url": "git+https://github.com/highlightjs/highlightjs-apex.git"
1515
},
1616
"auto-changelog": {
17-
"output": "HISTORY.md",
17+
"output": "CHANGELOG.md",
1818
"template": "keepachangelog",
1919
"unreleased": true,
2020
"hideCredit": true,

release-please-config.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"packages": {
3+
".": {
4+
"package-name": ""
5+
}
6+
},
7+
"release-type": "node",
8+
"prerelease": false,
9+
"prerelease-type": "",
10+
"initial-version": "1.2.1",
11+
"versioning": "default",
12+
"bump-minor-pre-major": false,
13+
"bump-patch-for-minor-pre-major": false,
14+
"draft": false,
15+
"changelog-path": "CHANGELOG.md",
16+
"include-v-in-tag": true,
17+
"include-component-in-tag": false,
18+
19+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
20+
"extra-files": [
21+
{
22+
"type": "json",
23+
"path": "package.json",
24+
"jsonpath": "$.version"
25+
}
26+
],
27+
"changelog-sections": [
28+
{ "type": "feat", "section": "Features", "hidden": false },
29+
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
30+
{ "type": "chore", "section": "Miscellaneous Chores", "hidden": false },
31+
{ "type": "revert", "section": "Reverts", "hidden": false },
32+
{ "type": "refactor", "section": "Code Refactoring", "hidden": false },
33+
{ "type": "style", "section": "Styles", "hidden": false },
34+
{ "type": "docs", "section": "Documentation", "hidden": false },
35+
{ "type": "perf", "section": "Performance Improvements", "hidden": false },
36+
{ "type": "test", "section": "Tests", "hidden": true },
37+
{ "type": "build", "section": "Build System", "hidden": false },
38+
{ "type": "ci", "section": "Continuous Integration", "hidden": false }
39+
]
40+
}

0 commit comments

Comments
 (0)