Skip to content

Commit

Permalink
ci(release-please): implement Release-Please for changelog (#17)
Browse files Browse the repository at this point in the history
This package will also upload npm packages, once configured
  • Loading branch information
dschach authored Nov 2, 2023
1 parent b20db94 commit c81e1ee
Show file tree
Hide file tree
Showing 8 changed files with 133 additions and 10 deletions.
6 changes: 2 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ updates:
directory: '/' # Location of package manifests
commit-message:
prefix: 'build'
include: 'scope'
rebase-strategy: 'auto'
schedule:
interval: 'daily'
- package-ecosystem: 'github-actions' # See documentation for possible values
directory: '/' # Location of package manifests
commit-message:
prefix: 'ci'
include: 'scope'
prefix: 'ci(actions)'
rebase-strategy: 'auto'
schedule:
interval: 'daily'
interval: 'daily'
45 changes: 45 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: release-please
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
release-type: node
package-name: highlightjs-apex
# The logic below handles the npm publication:
- name: Checkout Repository
# these if statements ensure that a publication only occurs when
# a new release is created:
if: ${{ steps.release.outputs.releases_created }}
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
if: ${{ steps.release.outputs.releases_created }}
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- name: Build Packages
if: ${{ steps.release.outputs.releases_created }}
run: |
npm install
npx lerna bootstrap
# Release Please has already incremented versions and published tags, so we just
# need to publish all unpublished versions to NPM here
# See: https://github.com/lerna/lerna/tree/main/commands/publish#bump-from-package
#- name: Publish to NPM
# if: ${{ steps.release.outputs.releases_created }}
# env:
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
# run: npx lerna publish from-package --no-push --no-private --yes
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,8 @@ typings/
.tern-port

# OSX file
.DS_Store
.DS_Store

# no idea why sfdx is in this repo, but excluding those folders
.sfdx
.sf
7 changes: 6 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
assets
demo
demo
.github
.vscode
node_modules,
.release-please-manifest.json
release-please-config.json
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.2.1"
}
32 changes: 30 additions & 2 deletions HISTORY.md → CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,36 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

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

## [v1.2.0](https://github.com/highlightjs/highlightjs-apex/compare/v1.1.0...v1.2.0) - 2023-03-29
### Merged

- build(deps): bump highlight.js from 11.8.0 to 11.9.0 [`#15`](https://github.com/highlightjs/highlightjs-apex/pull/15)
- ci(deps): bump actions/checkout from 3 to 4 [`#14`](https://github.com/highlightjs/highlightjs-apex/pull/14)
- build(deps-dev): bump prettier from 3.0.2 to 3.0.3 [`#13`](https://github.com/highlightjs/highlightjs-apex/pull/13)
- build(deps-dev): bump prettier from 3.0.1 to 3.0.2 [`#12`](https://github.com/highlightjs/highlightjs-apex/pull/12)
- build: include highlight.js as dependency [`#11`](https://github.com/highlightjs/highlightjs-apex/pull/11)
- build(deps-dev): bump prettier from 3.0.0 to 3.0.1 [`#10`](https://github.com/highlightjs/highlightjs-apex/pull/10)
- build(deps-dev): bump prettier from 2.8.8 to 3.0.0 [`#9`](https://github.com/highlightjs/highlightjs-apex/pull/9)
- build(deps-dev): bump highlight.js from 11.7.0 to 11.8.0 [`#8`](https://github.com/highlightjs/highlightjs-apex/pull/8)
- build(deps-dev): bump prettier from 2.8.7 to 2.8.8 [`#7`](https://github.com/highlightjs/highlightjs-apex/pull/7)

### Commits

- begin npm setup [`284b7df`](https://github.com/highlightjs/highlightjs-apex/commit/284b7dff2a4008f749b7852d1dad08a04680e9f1)
- chore: bootstrap releases for path: . [`4b448d9`](https://github.com/highlightjs/highlightjs-apex/commit/4b448d98734b7139ce6433bf4a7ac9a2c865fc74)
- chore: npm version 1.2.0 [`a5e6378`](https://github.com/highlightjs/highlightjs-apex/commit/a5e637896f9065a3e9d33017ec4afe397da3a9ce)

## [v1.2.1](https://github.com/highlightjs/highlightjs-apex/compare/v1.2.0...v1.2.1) - 2023-03-29

### Commits

- docs(changelog): update changelog v1.2.0 [`3144fae`](https://github.com/highlightjs/highlightjs-apex/commit/3144faef9f59a5a76ece758a32e9e9ad1c627064)
- chore: update package.json to v1.2.0 [`e2af1e6`](https://github.com/highlightjs/highlightjs-apex/commit/e2af1e67e63a2645faa9b75eb1fbf47a19b3b79b)

## [v1.2.0](https://github.com/highlightjs/highlightjs-apex/compare/v1.1.1...v1.2.0) - 2023-03-29

## [v1.1.1](https://github.com/highlightjs/highlightjs-apex/compare/v1.1.0...v1.1.1) - 2023-03-29

### Merged

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

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

## [v1.1.0](https://github.com/highlightjs/highlightjs-apex/compare/v1.0.0...v1.1.0) - 2022-06-02
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "highlightjs-apex",
"version": "1.2.0",
"version": "1.2.1",
"description": "Apex Language of Salesforce highlighting plugin for highlight.js",
"main": "src/languages/apex.js",
"scripts": {
Expand All @@ -14,7 +14,7 @@
"url": "git+https://github.com/highlightjs/highlightjs-apex.git"
},
"auto-changelog": {
"output": "HISTORY.md",
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": true,
"hideCredit": true,
Expand Down
40 changes: 40 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"packages": {
".": {
"package-name": ""
}
},
"release-type": "node",
"prerelease": false,
"prerelease-type": "",
"initial-version": "1.2.1",
"versioning": "default",
"bump-minor-pre-major": false,
"bump-patch-for-minor-pre-major": false,
"draft": false,
"changelog-path": "CHANGELOG.md",
"include-v-in-tag": true,
"include-component-in-tag": false,

"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"extra-files": [
{
"type": "json",
"path": "package.json",
"jsonpath": "$.version"
}
],
"changelog-sections": [
{ "type": "feat", "section": "Features", "hidden": false },
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
{ "type": "chore", "section": "Miscellaneous Chores", "hidden": false },
{ "type": "revert", "section": "Reverts", "hidden": false },
{ "type": "refactor", "section": "Code Refactoring", "hidden": false },
{ "type": "style", "section": "Styles", "hidden": false },
{ "type": "docs", "section": "Documentation", "hidden": false },
{ "type": "perf", "section": "Performance Improvements", "hidden": false },
{ "type": "test", "section": "Tests", "hidden": true },
{ "type": "build", "section": "Build System", "hidden": false },
{ "type": "ci", "section": "Continuous Integration", "hidden": false }
]
}

0 comments on commit c81e1ee

Please sign in to comment.