Skip to content

add colors

add colors #2

Workflow file for this run

name: Create Release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
- name: Get version from package.json
id: package-version
uses: martinbeentjes/npm-get-version-action@master
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: v${{ steps.package-version.outputs.current-version }}
name: Release ${{ steps.package-version.outputs.current-version }}
draft: false
prerelease: false
- name: Update major version tag
run: |
git config user.name github-actions
git config user.email github-actions@github.com
MAJOR_VERSION=$(echo ${{ steps.package-version.outputs.current-version }} | cut -d. -f1)
git tag -fa v${MAJOR_VERSION} -m "Update v${MAJOR_VERSION} tag"
git push origin v${MAJOR_VERSION} --force