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

release: version 2025.1.4 #17

Merged
merged 1 commit into from
Jan 4, 2025
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 0 additions & 34 deletions .github/workflows/notify.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/publish.yml

This file was deleted.

71 changes: 19 additions & 52 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Release

on:
push:
tags:
- 'v*.*.*'
pull_request:
types: [closed]
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release:
Expand All @@ -23,60 +23,27 @@ jobs:
node-version: 20
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Configure Git
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
- name: Fetch all tags
run: git fetch --tags
git config user.name "github-actions"
git config user.email "github-actions@github.com"
- name: Extract version and previous tag
id: extract_info
- name: Extract version from package.json
id: extract_version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
PREVIOUS_TAG=$(git describe --tags $(git rev-list --tags --skip=1 --max-count=1))
VERSION=$(jq -r '.version' package.json)
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "PREVIOUS_TAG=$PREVIOUS_TAG" >> $GITHUB_ENV
echo "Extracted version: $VERSION"
- name: Determine update type
id: determine_update_type
- name: Create Git tag
run: |
IFS='.' read -r -a NEW_VERSION_PARTS <<< "${VERSION}"
IFS='.' read -r -a OLD_VERSION_PARTS <<< "${PREVIOUS_TAG#v}"
git tag -a "${{ env.VERSION }}" -m "Release ${{ env.VERSION }}"
git push origin "${{ env.VERSION }}"
if [ "${NEW_VERSION_PARTS[0]}" != "${OLD_VERSION_PARTS[0]}" ]; then
UPDATE_TYPE=major
elif [ "${NEW_VERSION_PARTS[1]}" != "${OLD_VERSION_PARTS[1]}" ]; then
UPDATE_TYPE=minor
else
UPDATE_TYPE=patch
fi
echo "UPDATE_TYPE=$UPDATE_TYPE" >> $GITHUB_ENV
- name: Create and push new branch
run: |
NEW_BRANCH=release-v${VERSION}
git checkout -b ${NEW_BRANCH}
git push origin ${NEW_BRANCH}
echo "NEW_BRANCH=$NEW_BRANCH" >> $GITHUB_ENV
- name: Set up NPM auth
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Update version in package.json
run: jq --arg new_version "$VERSION" '.version = $new_version' package.json > temp.json && mv temp.json package.json

- name: Build the package
run: yarn build

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Update version to ${{ env.VERSION }} [${{ env.UPDATE_TYPE }}] and upgrade dependencies"
branch: ${{ env.NEW_BRANCH }}
base: main
title: "Release ${{ env.VERSION }}"
body: "This PR updates the version to ${{ env.VERSION }} and upgrades dependencies."
labels: release
- name: Publish to npm
run: yarn publish --non-interactive
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
![npm](https://img.shields.io/npm/v/style-forge.colors)
![license](https://img.shields.io/npm/l/style-forge.colors)
![npm](https://img.shields.io/npm/dm/style-forge.colors)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/e659ed33f24740a6942f68b7f87e254f)](https://app.codacy.com/gh/Style-Forge/colors/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
![build](https://github.com/Style-Forge/colors/actions/workflows/publish.yml/badge.svg)
![build](https://github.com/Style-Forge/colors/actions/workflows/release.yml/badge.svg)

`Style-Forge.Colors` package provides a comprehensive and customizable set of color palettes for your web applications. It includes predefined color schemes and the ability to create your own custom palettes, ensuring consistent and visually appealing designs across your projects.

Expand Down
2 changes: 1 addition & 1 deletion builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import pComments from 'postcss-discard-comments'
import pMinify from 'postcss-minify'

const packageFile = JSON.parse(fs.readFileSync('package.json', 'utf8'))
const title = packageFile.name + ' v' + packageFile.version
const title = packageFile.name + ' ' + packageFile.version
const license = packageFile.license + ' License'
const link = packageFile.repository.url.replace('git+', '').replace('.git', '')
const header = '/*! ' + [title, license, link].join(' | ') + ' */'
Expand Down
4 changes: 2 additions & 2 deletions colors.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "style-forge.colors",
"version": "1.3.1",
"version": "2025.1.4",
"description": "Style-Forge.Colors: customizable color palettes for consistent, visually appealing web designs.",
"type": "module",
"main": "colors.css",
Expand Down
Loading
Loading