Fix test failures and expand test coverage (#8) #4
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 Chrome Extension | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Validate Extension | |
| run: npm run validate | |
| - name: Get version from tag | |
| id: get_version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Validate CHANGELOG.md | |
| run: | | |
| VERSION="${{ steps.get_version.outputs.VERSION }}" | |
| if ! grep -q "## \[$VERSION\]" CHANGELOG.md; then | |
| echo "❌ Error: CHANGELOG.md does not contain an entry for version $VERSION" | |
| echo "Please add a changelog entry with the format: ## [$VERSION] - YYYY-MM-DD" | |
| exit 1 | |
| fi | |
| echo "✅ CHANGELOG.md contains entry for version $VERSION" | |
| - name: Create Release Zip | |
| run: | | |
| zip -r devwatch-github-v${{ steps.get_version.outputs.VERSION }}.zip \ | |
| manifest.json \ | |
| background.js \ | |
| popup \ | |
| options \ | |
| icons \ | |
| shared \ | |
| LICENSE \ | |
| README.md | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: devwatch-github-v${{ steps.get_version.outputs.VERSION }}.zip | |
| generate_release_notes: true | |
| draft: false | |
| prerelease: false |