Skip to content

Commit ffb0366

Browse files
authored
release: version 2025.1.4 (#14)
1 parent 477997b commit ffb0366

File tree

10 files changed

+53
-141
lines changed

10 files changed

+53
-141
lines changed

.github/workflows/notify.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 19 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: Release
22

33
on:
4-
push:
5-
tags:
6-
- 'v*.*.*'
4+
pull_request:
5+
types: [closed]
6+
branches:
7+
- main
78

89
permissions:
910
contents: write
10-
pull-requests: write
1111

1212
jobs:
1313
release:
@@ -23,60 +23,27 @@ jobs:
2323
node-version: 20
2424
cache: yarn
2525

26-
- name: Install dependencies
27-
run: yarn install --frozen-lockfile
28-
2926
- name: Configure Git
3027
run: |
31-
git config --global user.name 'github-actions'
32-
git config --global user.email 'github-actions@github.com'
33-
34-
- name: Fetch all tags
35-
run: git fetch --tags
28+
git config user.name "github-actions"
29+
git config user.email "github-actions@github.com"
3630
37-
- name: Extract version and previous tag
38-
id: extract_info
31+
- name: Extract version from package.json
32+
id: extract_version
3933
run: |
40-
VERSION=${GITHUB_REF#refs/tags/v}
41-
PREVIOUS_TAG=$(git describe --tags $(git rev-list --tags --skip=1 --max-count=1))
34+
VERSION=$(jq -r '.version' package.json)
4235
echo "VERSION=$VERSION" >> $GITHUB_ENV
43-
echo "PREVIOUS_TAG=$PREVIOUS_TAG" >> $GITHUB_ENV
36+
echo "Extracted version: $VERSION"
4437
45-
- name: Determine update type
46-
id: determine_update_type
38+
- name: Create Git tag
4739
run: |
48-
IFS='.' read -r -a NEW_VERSION_PARTS <<< "${VERSION}"
49-
IFS='.' read -r -a OLD_VERSION_PARTS <<< "${PREVIOUS_TAG#v}"
40+
git tag -a "${{ env.VERSION }}" -m "Release ${{ env.VERSION }}"
41+
git push origin "${{ env.VERSION }}"
5042
51-
if [ "${NEW_VERSION_PARTS[0]}" != "${OLD_VERSION_PARTS[0]}" ]; then
52-
UPDATE_TYPE=major
53-
elif [ "${NEW_VERSION_PARTS[1]}" != "${OLD_VERSION_PARTS[1]}" ]; then
54-
UPDATE_TYPE=minor
55-
else
56-
UPDATE_TYPE=patch
57-
fi
58-
echo "UPDATE_TYPE=$UPDATE_TYPE" >> $GITHUB_ENV
59-
60-
- name: Create and push new branch
61-
run: |
62-
NEW_BRANCH=release-v${VERSION}
63-
git checkout -b ${NEW_BRANCH}
64-
git push origin ${NEW_BRANCH}
65-
echo "NEW_BRANCH=$NEW_BRANCH" >> $GITHUB_ENV
43+
- name: Set up NPM auth
44+
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
6645

67-
- name: Update version in package.json
68-
run: jq --arg new_version "$VERSION" '.version = $new_version' package.json > temp.json && mv temp.json package.json
69-
70-
- name: Build the package
71-
run: yarn build
72-
73-
- name: Create Pull Request
74-
uses: peter-evans/create-pull-request@v6
75-
with:
76-
token: ${{ secrets.GITHUB_TOKEN }}
77-
commit-message: "Update version to ${{ env.VERSION }} [${{ env.UPDATE_TYPE }}] and upgrade dependencies"
78-
branch: ${{ env.NEW_BRANCH }}
79-
base: main
80-
title: "Release ${{ env.VERSION }}"
81-
body: "This PR updates the version to ${{ env.VERSION }} and upgrades dependencies."
82-
labels: release
46+
- name: Publish to npm
47+
run: yarn publish --non-interactive
48+
env:
49+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
![npm](https://img.shields.io/npm/v/style-forge.themes)
55
![license](https://img.shields.io/npm/l/style-forge.themes)
66
![npm](https://img.shields.io/npm/dm/style-forge.themes)
7-
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/1d2b8e1397f34fccb75e7dbd4ca34c29)](https://app.codacy.com/gh/Style-Forge/themes/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
8-
![build](https://github.com/Sarmaged/style-forge.themes/actions/workflows/publish.yml/badge.svg)
7+
![build](https://github.com/Sarmaged/style-forge.themes/actions/workflows/release.yml/badge.svg)
98

109
`Style-Forge.Themes` package is a powerful and flexible tool designed for managing and applying themes to your web applications. It provides a streamlined way to handle theme customization, allowing developers to create, switch, and maintain multiple themes effortlessly.
1110

builder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const [from, to] = ['src/all.css', 'themes.css']
88
const css = fs.readFileSync(from, 'utf8')
99

1010
const packageFile = JSON.parse(fs.readFileSync('package.json', 'utf8'))
11-
const title = packageFile.name + ' v' + packageFile.version
11+
const title = packageFile.name + ' ' + packageFile.version
1212
const license = packageFile.license + ' License'
1313
const link = packageFile.repository.url.replace('git+', '').replace('.git', '')
1414
const header = '/*! ' + [title, license, link].join(' | ') + ' */'

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "style-forge.themes",
3-
"version": "1.1.5",
3+
"version": "2025.1.4",
44
"description": "Style-Forge.Themes: powerful tool for managing and applying customizable themes in web applications.",
55
"type": "module",
66
"main": "themes.css",

src/all.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
@import 'var.css';
2+
@import 'compatibility.css';

src/compatibility.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
html.var {
2+
color: hsl(0, 0%, 10%);
3+
background: hsl(0, 0%, 100%);
4+
}
5+
html.var a { color: hsl(225, 73%, 57%) }
6+
html.var pre { background: hsl(0, 0%, 90%) }
7+
8+
html.var[data-theme='dark'], html.var.dark {
9+
color: hsl(0, 0%, 90%);
10+
background: hsl(0, 0%, 10%);
11+
}
12+
html.var[data-theme='dark'] pre, html.var.dark pre { background: hsl(0, 0%, 20%) }
13+
html.var[data-theme='dark'] ::backdrop, html.var.dark ::backdrop { --sf-c-backdrop: hsla(0, 0%, 100%, 0.2) }
14+
15+
@media (prefers-color-scheme: dark) {
16+
html.var[data-theme='auto'], html.var.auto {
17+
color: hsl(0, 0%, 90%);
18+
background: hsl(0, 0%, 10%);
19+
}
20+
html.var[data-theme='auto'] pre, html.var.auto pre { background: hsl(0, 0%, 20%) }
21+
html.var[data-theme='auto'] ::backdrop, html.var.auto ::backdrop { --sf-c-backdrop: hsla(0, 0%, 100%, 0.2) }
22+
}

src/var.css

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
:root {
22
--sf-c-link: 225 73% 57%;
3-
--sf-c-link-active: 288 59% 58%;
4-
5-
--sf-c-mark-bg: 60 100% 50%;
6-
--sf-c-mark-txt: 0 0% 10%;
7-
83
--sf-c-txt: 0 0% 10%;
94
--sf-c-bg: 0 0% 100%;
105
--sf-c-bd: 0 0% 75%;
116
--sf-c-shape-bg: 0 0% 90%;
127

138
/* colors for dark theme */
149
--sf-dark-c-link: 225 73% 57%;
15-
16-
--sf-dark-c-mark-bg: 60 100% 50%;
17-
--sf-dark-c-mark-txt: 0 0% 10%;
18-
1910
--sf-dark-c-txt: 0 0% 90%;
2011
--sf-dark-c-bg: 0 0% 10%;
2112
--sf-dark-c-bd: 0 0% 50%;
@@ -27,43 +18,37 @@
2718
--sf-dark-c-backdrop: 0 0% 100%;
2819
}
2920

30-
[data-theme] {
21+
html {
3122
color-scheme: light;
3223
transition: background-color 0.2s ease-out;
3324
}
3425

35-
:root:where([data-theme='auto'], .auto) {
26+
html[data-theme='auto'], html.auto {
3627
color-scheme: light dark;
3728
}
3829

39-
:root:where([data-theme='dark'], .dark) {
30+
html[data-theme='dark'], html.dark {
4031
color-scheme: dark;
4132

4233
--sf-c-link: var(--sf-dark-c-link);
43-
--sf-c-mark-bg: var(--sf-dark-c-mark-bg);
44-
--sf-c-mark-txt: var(--sf-dark-c-mark-txt);
45-
4634
--sf-c-bd: var(--sf-dark-c-bd);
4735
--sf-c-bg: var(--sf-dark-c-bg);
4836
--sf-c-shape-bg: var(--sf-dark-c-shape-bg);
4937
--sf-c-txt: var(--sf-dark-c-txt);
5038
}
5139

52-
:root:where([data-theme='dark'], .dark) ::backdrop { --sf-c-backdrop: var(--sf-dark-c-backdrop) }
40+
html[data-theme='dark'] ::backdrop, html.dark ::backdrop { --sf-c-backdrop: var(--sf-dark-c-backdrop) }
5341

5442
@media (prefers-color-scheme: dark) {
55-
:root:where([data-theme='auto'], .auto) {
43+
html[data-theme='auto'], html.auto {
5644
color-scheme: dark;
5745

5846
--sf-c-link: var(--sf-dark-c-link);
59-
--sf-c-mark-bg: var(--sf-dark-c-mark-bg);
60-
--sf-c-mark-txt: var(--sf-dark-c-mark-txt);
61-
6247
--sf-c-bd: var(--sf-dark-c-bd);
6348
--sf-c-bg: var(--sf-dark-c-bg);
6449
--sf-c-shape-bg: var(--sf-dark-c-shape-bg);
6550
--sf-c-txt: var(--sf-dark-c-txt);
6651
}
6752

68-
:root:where([data-theme='auto'], .auto) ::backdrop { --sf-c-backdrop: var(--sf-dark-c-backdrop) }
53+
html[data-theme='auto'] ::backdrop, html.auto ::backdrop { --sf-c-backdrop: var(--sf-dark-c-backdrop) }
6954
}

themes.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)