Skip to content

Commit

Permalink
add the release action and cleanup missconfigured ones
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-malikov committed Nov 19, 2022
1 parent edfa158 commit cfa45ec
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 45 deletions.
25 changes: 15 additions & 10 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# top-most EditorConfig file
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_size = 4
tab_width = 4
# top-most EditorConfig file
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_size = 4
tab_width = 4

[*.yml]
indent_style = space
indent_size = 2
tab_width = 2
46 changes: 23 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
name: CI

on:
push:
branches: [master]
pull_request:
branches: [master]
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]
strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v3
steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: latest
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: latest

- name: Install dependencies
run: pnpm install
- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build
- name: Build
run: pnpm build
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Release

on:
push:
tags:
- "*"

jobs:
tagged-release:
name: "Tagged Release"
runs-on: "ubuntu-latest"

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: latest

- name: Install dependencies
run: pnpm install

- name: Ensure version
run: pnpm version

- name: Build
run: pnpm build

- name: Create a release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
./main.js
./manifest.json
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,21 @@ Replaces the default [Obsidian](https://obsidian.md/) caret with a smooth and ro
<img src="./assets/dark_03.png" width="256">
</p>

<div align="center">

Dark | Light
----------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------
<video src="https://user-images.githubusercontent.com/35894527/197403985-435c6bff-1004-4b6b-b3bb-3ab13a8ab4c2.mov"></video> | <video src="https://user-images.githubusercontent.com/35894527/197403980-884bda0d-0ba1-4b59-8f2e-f1454f959635.mov"></video>

</div>

## Features

- Smooth caret which stops blinking after 20 iterations.
- Round selection.

## Related

- Based on the default selection [extension](https://github.com/codemirror/view/blob/main/src/draw-selection.ts). The actual code is a bit transformed into functional style while cursor is fully based on Obsidian's one.
- Based on the default selection [extension](https://github.com/codemirror/view/blob/main/src/draw-selection.ts). The actual code is a bit transformed into a functional style while the cursor is fully based on Obsidian's one.
- [The blink animation](https://easings.net/#easeInOutCirc).

## Releasing new releases

- Update your `manifest.json` with your new version number, such as `1.0.1`, and the minimum Obsidian version required for your latest release.
- Update your `versions.json` file with `"new-plugin-version": "minimum-obsidian-version"` so older versions of Obsidian can download an older version of your plugin that's compatible.
- Create new GitHub release using your new version number as the "Tag version". Use the exact version number, don't include a prefix `v`. See here for an example: <https://github.com/obsidianmd/obsidian-sample-plugin/releases>
Create a new GitHub release using your new version number as the "Tag version". Use the exact version number, don't include a prefix `v`. See here for an example: <https://github.com/obsidianmd/obsidian-sample-plugin/releases>
- Upload the files `manifest.json`, `main.js`, `styles.css` as binary attachments. Note: The manifest.json file must be in two places, first the root path of your repository and also in the release.
- Publish the release.

Expand Down
Empty file removed styles.css
Empty file.
2 changes: 0 additions & 2 deletions versions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"1.0.0": "1.0.0",
"1.0.1": "1.0.1",
"1.1.0": "1.0.1"
}

0 comments on commit cfa45ec

Please sign in to comment.