File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8585 run: |
8686 echo "Tag ${{ steps.extract_version.outputs.version }} already exists"
8787 echo "If you want to re-release, delete the tag first: git push --delete origin ${{ steps.extract_version.outputs.version }}"
88+
89+ - name: Update package.json and manifest.json versions
90+ run: |
91+ VERSION="${{ steps.extract_version.outputs.version }}"
92+ echo "Updating version to $VERSION in package.json and manifest.json"
93+
94+ # Update package.json
95+ cd packages/plugin
96+ sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" package.json
97+
98+ # Update manifest.json
99+ sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" manifest.json
100+
101+ # Show the changes
102+ echo "Updated package.json:"
103+ grep "version" package.json
104+ echo "Updated manifest.json:"
105+ grep "version" manifest.json
106+
107+ cd ../..
108+
109+ - name: Commit version changes
110+ run: |
111+ git config --local user.email "action@github.com"
112+ git config --local user.name "GitHub Action"
113+ git add packages/plugin/package.json packages/plugin/manifest.json
114+ git diff --staged --quiet || git commit -m "chore: bump version to ${{ steps.extract_version.outputs.version }}"
115+ git push origin "${GITHUB_REF#refs/heads/}"
You can’t perform that action at this time.
0 commit comments