Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define publishing workflow #3

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release

on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false

- name: Setup Node.js environment
uses: actions/setup-node@v3.6.0
with:
node-version: '18'

- name: Install dependencies
run: yarn install

- name: Build dist
run: yarn run build

- name: Install zip
uses: montudor/action-zip@v1

- name: Release
run: npx semantic-release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Aleksei Gusev (@hron)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "logseq-cycle-todo-dwim",
"version": "0.0.1",
"description": "logseq plugin for Ctrl+Enter shortcut just like in org-mode",
"description": "Ctrl+Enter with repeating timestamp support, similar to org-mode",
"author": "Aleksei Gusev <aleksei.gusev@gmail.com>",
"license": "MIT",
"scripts": {
Expand All @@ -17,6 +17,9 @@
"format:fix": "prettier . --write"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@eslint/js": "^9.15.0",
"@playwright/test": "^1.48.2",
"@types/luxon": "^3.4.2",
Expand All @@ -27,6 +30,7 @@
"parcel": "2.9.3",
"playwright": "^1.48.2",
"prettier": "3.3.3",
"semantic-release": "^22.0.0",
"typescript": "^5.7.2",
"typescript-eslint": "^8.15.0"
},
Expand Down
41 changes: 41 additions & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
var PLUGIN_NAME = 'cycle-todo-dwim'

// eslint-disable-next-line no-undef
module.exports = {
branches: ['main'],
plugins: [
[
'@semantic-release/commit-analyzer',
{
preset: 'conventionalcommits',
},
],
'@semantic-release/release-notes-generator',
'@semantic-release/changelog',
[
'@semantic-release/npm',
{
verifyConditions: false,
npmPublish: false,
},
],
'@semantic-release/git',
[
'@semantic-release/exec',
{
prepareCmd:
`zip -qq -r ${PLUGIN_NAME}-` +
'${nextRelease.version}.zip dist icon.webp package.json README.md LICENSE',
},
],
[
'@semantic-release/github',
{
assets: `${PLUGIN_NAME}-*.zip`,
fail: false,
failComment: false,
failTitle: false,
},
],
],
}
1 change: 0 additions & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ with pkgs; mkShell {
buildInputs = [
nodejs_18
yarn
bashInteractive
];
}
Loading
Loading