Define process.env.NODE_ENV as production in Vite configuration
#10
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
| # .github/workflows/release.yml | |
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # läuft bei Tags wie v1.0.0, v2.3.4 | |
| permissions: | |
| contents: write # erlaubt Release-Uploads | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Remove files containing '.test.' | |
| run: | | |
| echo "Folgende Dateien werden gelöscht:" | |
| find . -type f -name "*\.test\.*" -print | |
| find . -type f -name "*\.test\.*" -delete | |
| # Beispiel: Abhängigkeiten installieren und Build erstellen | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build project | |
| run: npm run build:bundle | |
| # Bundle/Artefakt packen (z. B. zip) | |
| - name: Create archive | |
| run: zip -j dist/bundle-${{ github.ref_name }}.zip dist/bundle.js | |
| - name: Upload artifact (for debugging) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bundle | |
| path: dist/bundle-${{ github.ref_name }}.zip | |
| # GitHub Release erstellen | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/bundle-${{ github.ref_name }}.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |