Skip to content

Commit

Permalink
Merge branch 'release/v1.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
freder committed Mar 27, 2023
2 parents e659320 + 700eb6a commit 5d46f21
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 6 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,10 @@ jobs:
node-version: "18"
- run: npm install
- run: npm run build
- run: node scripts/make-release-note.js
- name: Install zip
uses: montudor/action-zip@v1
- run: zip -r dist.zip ./dist package.json
# - name: Release
# run: npx semantic-release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: release
uses: actions/create-release@v1
id: create_release
Expand All @@ -45,7 +42,7 @@ jobs:
prerelease: false
release_name: ${{ steps.version.outputs.version }}
tag_name: ${{ github.ref }}
# body_path: CHANGELOG.md
body_path: release-note.md
env:
GITHUB_TOKEN: ${{ github.token }}
- name: upload artifact
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
dist
_screen-capture
release-note.md
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog


## 1.2.2

### Added
- Changelog / release notes
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "logseq-plugin-jump-to-block",
"version": "1.2.1",
"version": "1.2.2",
"main": "dist/index.html",
"logseq": {
"id": "logseq-plugin-jump-to-block"
Expand Down
23 changes: 23 additions & 0 deletions scripts/make-release-note.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const fs = require('fs');
const R = require('ramda');


const content = fs.readFileSync('./changelog.md').toString();
let lines = content.split('\n');

let numTagsSeen = 0;
lines = R.takeWhile(
(line) => {
if (line.startsWith('## ')) {
numTagsSeen += 1;
}
if (numTagsSeen >= 2) {
return false;
}
return true;
},
lines
);

const releaseNotes = lines.join('\n').trim();
fs.writeFileSync('release-note.md', releaseNotes);

0 comments on commit 5d46f21

Please sign in to comment.