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
run: npm ci
- name: 🔄 Attempt update
- name: 🔄 Attempt update and prepare release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm run update
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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run build
- name: 📜 Generate changelog and release notes
- name: 📜 Commit and Tag Release
env:
# Don't run husky on `git commit`
HUSKY: 0
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 }}
- name: 📝 Get metadata
run: |
VERSION=$(jq -r '.version' package.json)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: 🌐 Upload to chrome store
continue-on-error: true
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">
### 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",
"update-manifest-version": "ts-node ./scripts/update-manifest-version.ts",
"update-upstream-version": "ts-node ./scripts/update-upstream-version.ts",
"update-package-version": "npm version --no-git-tag-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 --",
"update-versions": "run-s update-upstream-version update-manifest-version",
"lint": "npx @biomejs/biome check --write ./src",
"format": "npx @biomejs/biome format --write ./src",
"prepare": "husky"

View File

@ -3,7 +3,7 @@ import * as path from 'path';
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.
*/