feat(ci): update release process

This commit is contained in:
Philipp Kief 2025-03-04 20:31:06 +01:00
parent 0e01e4094c
commit ebc3fedbac
No known key found for this signature in database
GPG Key ID: A8C6D8A9108F37B2
4 changed files with 17 additions and 14 deletions

View File

@ -76,32 +76,35 @@ jobs:
- name: 📦 Install dependencies - name: 📦 Install dependencies
run: npm ci run: npm ci
- name: 🔄 Attempt update - name: 🔄 Attempt update and prepare release
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
npm run update
npm install material-icon-theme@5.x npm install material-icon-theme@5.x
git add package-lock.json npx changelogen --bump --hideAuthorEmail
npm run update-versions
- name: 📝 Get metadata
run: |
VERSION=$(jq -r '.version' package.json)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: 🏗️ Build extension - name: 🏗️ Build extension
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run build run: npm run build
- name: 📜 Generate changelog and release notes - name: 📜 Commit and Tag Release
env: env:
# Don't run husky on `git commit` # Don't run husky on `git commit`
HUSKY: 0 HUSKY: 0
run: | run: |
npx changelogen --hideAuthorEmail --release --push git add package.json package-lock.json src/manifests/base.json CHANGELOG.md README.md
git commit -m "chore(release): v$VERSION"
git tag "v$VERSION"
git push origin --follow-tags
npx changelogen github release --token ${{ secrets.GITHUB_TOKEN }} npx changelogen github release --token ${{ secrets.GITHUB_TOKEN }}
- name: 📝 Get metadata
run: |
VERSION=$(jq -r '.version' package.json)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: 🌐 Upload to chrome store - name: 🌐 Upload to chrome store
continue-on-error: true continue-on-error: true
uses: trmcnvn/chrome-addon@7fc5a5ad3ff597dc64d6a13de7dcaa8515328be7 # v2 uses: trmcnvn/chrome-addon@7fc5a5ad3ff597dc64d6a13de7dcaa8515328be7 # v2

View File

@ -14,6 +14,8 @@
--- ---
<a href="https://github.com/material-extensions/vscode-material-icon-theme"><img src="https://img.shields.io/badge/last_built_with_vscode_theme-v5.19.0-blue" /></a>
<img valign="middle" src="https://img.shields.io/chrome-web-store/v/bggfcpfjbdkhfhfmkjpbhnkhnpjjeomc?label=Version%20Available%20in%20Chrome%20Store"> <img valign="middle" src="https://img.shields.io/chrome-web-store/v/bggfcpfjbdkhfhfmkjpbhnkhnpjjeomc?label=Version%20Available%20in%20Chrome%20Store">
### About ### About

View File

@ -67,9 +67,7 @@
"bundle-firefox": "web-ext -s ./dist/firefox/ -n github-material-icons-firefox-extension.zip -a . build --overwrite-dest", "bundle-firefox": "web-ext -s ./dist/firefox/ -n github-material-icons-firefox-extension.zip -a . build --overwrite-dest",
"update-manifest-version": "ts-node ./scripts/update-manifest-version.ts", "update-manifest-version": "ts-node ./scripts/update-manifest-version.ts",
"update-upstream-version": "ts-node ./scripts/update-upstream-version.ts", "update-upstream-version": "ts-node ./scripts/update-upstream-version.ts",
"update-package-version": "npm version --no-git-tag-version", "update-versions": "run-s update-upstream-version update-manifest-version",
"update": "run-s update-upstream-version \"update-package-version patch\" update-manifest-version build",
"release": "run-s \"update-package-version {1}\" update-manifest-version build --",
"lint": "npx @biomejs/biome check --write ./src", "lint": "npx @biomejs/biome check --write ./src",
"format": "npx @biomejs/biome format --write ./src", "format": "npx @biomejs/biome format --write ./src",
"prepare": "husky" "prepare": "husky"

View File

@ -3,7 +3,7 @@ import * as path from 'path';
import * as fs from 'fs/promises'; import * as fs from 'fs/promises';
/** /**
* Gets latest VSCode Extension release version by parsing its most recent 100 commit msgs * Gets latest version of the Material Icon Theme Module
* *
* @returns {Promise<string>} The current version of the upstream repository. * @returns {Promise<string>} The current version of the upstream repository.
*/ */