Release Zed Extension #5
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 Zed Extension | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| release_type: | |
| description: 'Release type (major, minor, patch)' | |
| required: true | |
| default: 'minor' | |
| type: choice | |
| options: | |
| - major | |
| - minor | |
| - patch | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| actions: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| token: ${{ secrets.GH_ACCESS_TOKEN }} | |
| - name: Configure Git | |
| run: | | |
| git config user.name 'github-actions[bot]' | |
| git config user.email 'github-actions[bot]@users.noreply.github.com' | |
| git config --global push.followTags true | |
| - name: Bump version without git operations | |
| run: npm version ${{ github.event.inputs.release_type }} --no-git-tag-version | |
| - name: Get new version | |
| id: get_version | |
| run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | |
| - name: Update extension.toml version | |
| run: sed -i 's/^version = ".*"/version = "${{ steps.get_version.outputs.VERSION }}"/' extension.toml | |
| - name: Commit and tag the version bump | |
| run: | | |
| git add package.json package-lock.json extension.toml | |
| git commit -m "Release v${{ steps.get_version.outputs.VERSION }}" | |
| git tag "v${{ steps.get_version.outputs.VERSION }}" | |
| - name: Push changes and tags | |
| run: git push origin HEAD --tags | |
| - uses: huacnlee/zed-extension-action@v1 | |
| with: | |
| extension-name: material-icon-theme | |
| push-to: material-extensions/zed-extensions | |
| env: | |
| COMMITTER_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} |