fix: revert version number to 0.0.1 in manifest.json #3
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*.*.*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Validate extension | |
| run: npm test | |
| - name: Verify tag matches manifest version | |
| run: | | |
| TAG_VERSION="${GITHUB_REF_NAME#v}" | |
| MANIFEST_VERSION=$(node -p "require('./manifest.json').version") | |
| if [ "$TAG_VERSION" != "$MANIFEST_VERSION" ]; then | |
| echo "Tag version $TAG_VERSION does not match manifest version $MANIFEST_VERSION" | |
| exit 1 | |
| fi | |
| - name: Create release archive | |
| run: | | |
| VERSION=$(node -p "require('./manifest.json').version") | |
| mkdir -p dist | |
| zip -r "dist/zcloudpass-extension-${VERSION}.zip" \ | |
| manifest.json \ | |
| background.js \ | |
| content.js \ | |
| content.css \ | |
| popup.html \ | |
| popup.css \ | |
| popup.js \ | |
| README.md \ | |
| icons | |
| - name: Publish GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/*.zip | |
| generate_release_notes: true |