Skip to content

Commit

Permalink
feat(ci): add semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
Walheimat committed Jan 28, 2024
1 parent 12c3be9 commit 3352cda
Show file tree
Hide file tree
Showing 9 changed files with 6,508 additions and 22 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release
on: workflow_dispatch

jobs:
test:
uses: ./.github/workflows/verify.yml
release:
needs: [test]
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- name: Check out the repository
uses: actions/checkout@v3
with:
submodules: true
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "20"

- name: Install dependencies
run: npm ci

- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
run: npx semantic-release
10 changes: 5 additions & 5 deletions .github/workflows/verify.yaml → .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
branches:
- trunk
paths-ignore:
- '.gitignore'
- 'CHANGELOG.md'
- 'README.org'
- 'assets/**'
- .gitignore
- CHANGELOG.md
- README.org
workflow_call:

jobs:
test:
Expand All @@ -31,7 +31,7 @@ jobs:
with:
submodules: true

- name: Install dependencies with Cask
- name: Tangle and install dependencies with Cask
run: make

- name: Run tests
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
coverage/
dist/
whale-line-autoloads.el
whale-line-pkg.el
whale-line-pkg.el
node_modules/
47 changes: 47 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"branches": [
"trunk"
],
"repositoryUrl": "[email protected]:Walheimat/whale-line.git",
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{
"type": "feat",
"release": "patch"
}
]
},
],
"@semantic-release/release-notes-generator",
[
"@semantic-release/exec",
{
"prepareCmd": "make update-next-version NEXT_PACKAGE_VERSION=${nextRelease.version}"
}
],
[
"@semantic-release/changelog",
{
"changelogTitle": "# Changelog"
}
],
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md",
"whale-line.el",
"whale-line-segments.el",
"whale-line-iconify.el",
"whale-line-edit.el",
"Cask",
"Makefile"
]
}
]
]
}
14 changes: 0 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
# Changelog

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]

### Added

- Variable `whale-line--debug-padding` that when toggled renders
padding using `whale-line-highlight`.
- Segments `misc-info` and `process` now set `:dense problematic`.
This means their contents are evaluated before padding.

## [0.8.4]

### Added
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ UPDATE_VERSION_FILES=Cask \
whale-line.el \
whale-line-segments.el \
whale-line-iconify.el \
whale-line-edit.el
whale-line-edit.el \
Makefile

include dinghy/emacs-package.mk
Loading

0 comments on commit 3352cda

Please sign in to comment.