Skip to content

Commit

Permalink
fix: ci and bump to v1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
poohcom1 committed Jun 6, 2024
1 parent ea14491 commit a07b1d7
Show file tree
Hide file tree
Showing 10 changed files with 408 additions and 275 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release

on:
push:
tags:
- 'v*.*.*'

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

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: 'true'

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: yarn

- name: Build with webpack
run: yarn prod

- name: Get script content
id: get-script
run: |
echo "bundle_content<<EOF" >> $GITHUB_ENV
cat dist/twitterArtTags.user.js >> $GITHUB_ENV
echo -e "\n" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Get commit messages
id: get-commits
run: |
commits=$(git log -1 --pretty=format:"%H")
changes=$(git log --pretty=format:"* %s" ${commits}..HEAD)
echo "changes=$changes" >> $GITHUB_ENV
- name: Create GitHub release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
```javascript
${{ env.bundle_content }}
```
# Changes
${{ env.changes }}
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.github
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[yaml]": {
"editor.insertSpaces": true,
"editor.tabSize": 2,
"editor.autoIndent": "keep",
"diffEditor.ignoreTrimWhitespace": false,
"editor.quickSuggestions": {
"other": true,
"comments": false,
"strings": true
}
},
"editor.insertSpaces": true,
"editor.tabSize": 4,
"editor.formatOnSave": true,
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "twitter-art-tags",
"author": "poohcom1",
"description": "",
"version": "1.1.1",
"version": "1.1.2",
"private": true,
"engines": {
"node": ">=18.20.3"
Expand All @@ -17,7 +17,6 @@
"devDependencies": {
"@eslint/js": "^9.4.0",
"@types/eslint__js": "^8.42.3",
"@types/vanilla-context-menu": "file:vanilla-context-menu",
"@typescript-eslint/eslint-plugin": "^7.12.0",
"@typescript-eslint/parser": "^7.12.0",
"css-loader": "^7.1.2",
Expand Down
1 change: 0 additions & 1 deletion src/pages/tagsGallery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import pencilIcon from '../assets/pencil.svg';
import trashIcon from '../assets/trash.svg';
import squareIcon from '../assets/square.svg';
import checkSquareIcon from '../assets/check-square.svg';
import type { MenuItem } from 'vanilla-context-menu/dist/@types/interface';

const ID_IMAGE = 'tagImage';
const ID_IMPORT = 'tagImport';
Expand Down
70 changes: 69 additions & 1 deletion src/types/vanillaContextMenu.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,69 @@
declare const VanillaContextMenu: typeof import('vanilla-context-menu').default;
interface CoreOptions {
transformOrigin: [string, string];
}
interface DefaultOptions {
transitionDuration: number;
theme: 'black' | 'white';
normalizePosition?: boolean;
customNormalizeScope?: HTMLElement;
}
interface ConfigurableOptions extends Partial<DefaultOptions> {
scope: HTMLElement;
menuItems: MenuItem[];
customClass?: string;
customThemeClass?: string;
openSubMenuOnHover?: boolean;
preventCloseOnClick?: boolean;
}
interface Options extends ConfigurableOptions, CoreOptions {}
interface BaseMenuOption {
label: string;
callback?: (ev: MouseEvent) => unknown;
/**
* @deprecated This property was replaced by the new iconHTML property
*/
iconClass?: string;
iconHTML?: string;
preventCloseOnClick?: boolean;
}
interface MenuOption extends BaseMenuOption {
nestedMenu?: NestedMenuItem[];
}
type MenuItem = MenuOption | 'hr';
type NestedMenuItem = BaseMenuOption | 'hr';

declare class BaseContextMenu {
#private;
options: Options;
initialContextMenuEvent: MouseEvent | undefined;
applyStyleOnContextMenu: (
contextMenu: HTMLElement,
outOfBoundsOnX: boolean,
outOfBoundsOnY: boolean
) => void;
/**
* Interpolate the state variables inside the pug element and create an HTML Element
*/
buildContextMenu: () => HTMLElement;
updateOptions(configurableOptions: Partial<ConfigurableOptions>): void;
getNormalizedPosition: (
mouseX: number,
mouseY: number,
contextMenu: HTMLElement
) => {
normalizedX: number;
normalizedY: number;
};
}
declare class VanillaContextMenu extends BaseContextMenu {
#private;
constructor(configurableOptions: ConfigurableOptions);
/**
* Remove all the event listeners that were registered for this feature
*/
off(): void;
/**
* Close the context menu
*/
close(): void;
}
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"declaration": false,
"sourceMap": true,
"esModuleInterop": true,
"moduleResolution": "node"
"moduleResolution": "node",
"types": ["node"]
},
"include": ["./src/**/*"],
"exclude": ["node_modules", "vanilla-context-menu"]
Expand Down
1 change: 0 additions & 1 deletion vanilla-context-menu
Submodule vanilla-context-menu deleted from 57da93
Loading

0 comments on commit a07b1d7

Please sign in to comment.