Suppression de l'étape de création de release dans le workflow de pub… #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "npm" | |
- name: Install dependencies | |
run: npm ci | |
- name: Extract version from tag | |
id: version | |
run: | | |
# Extraire la version du tag (ex: v1.2.3 -> 1.2.3) | |
VERSION=${GITHUB_REF#refs/tags/} | |
VERSION=${VERSION#v} | |
echo "version=$VERSION" >> $GITHUB_OUTPUT | |
echo "✅ Version extraite du tag: $VERSION" | |
- name: Update manifest version | |
run: | | |
# Extraire la version du tag (ex: v1.2.3 -> 1.2.3) | |
VERSION=${GITHUB_REF#refs/tags/} | |
VERSION=${VERSION#v} | |
# Mettre à jour le manifest.json | |
sed -i "s/\"version\": \"[^\"]*\"/\"version\": \"$VERSION\"/" manifest.json | |
echo "✅ Version mise à jour dans manifest.json: $VERSION" | |
- name: Run tests | |
run: | | |
npm run build | |
npm run lint | |
npx tsc --noEmit | |
- name: Build extension | |
run: npm run build | |
- name: Create Chrome Store ZIP | |
run: | | |
# Créer le ZIP pour Chrome Store | |
cd dist | |
zip -r "../myhover-translator-${{ steps.version.outputs.version }}.zip" . -x "*.DS_Store" "*/.*" | |
cd .. | |
echo "✅ ZIP créé: myhover-translator-${{ steps.version.outputs.version }}.zip" | |
- name: Upload Chrome Store ZIP | |
uses: actions/upload-artifact@v4 | |
with: | |
name: chrome-store-zip-${{ steps.version.outputs.version }} | |
path: myhover-translator-${{ steps.version.outputs.version }}.zip | |
retention-days: 10 |