Release 3.4.0 #6
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: | |
| workflow_dispatch: | |
| inputs: | |
| increment: | |
| description: Release increment (patch, minor, major) | |
| required: false | |
| default: "patch" | |
| type: choice | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| publish: | |
| name: release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build | |
| run: bun run build | |
| - name: Configure Git identity | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Run release-it | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| ZED_EXTENSIONS_TOKEN: ${{ secrets.ZED_EXTENSIONS_TOKEN }} | |
| run: | | |
| if [ -n "${ZED_EXTENSIONS_TOKEN}" ]; then | |
| export GITHUB_TOKEN="${ZED_EXTENSIONS_TOKEN}" | |
| fi | |
| if [ "${GITHUB_EVENT_NAME}" = "workflow_dispatch" ]; then | |
| INCREMENT="${{ github.event.inputs.increment }}" | |
| if [ -z "$INCREMENT" ]; then | |
| INCREMENT="patch" | |
| fi | |
| bun run release:ci -- --increment="${INCREMENT}" | |
| exit 0 | |
| fi | |
| TAG_VERSION="${GITHUB_REF_NAME#v}" | |
| if [ -z "$TAG_VERSION" ]; then | |
| echo "Could not parse release version from tag: ${GITHUB_REF_NAME}" | |
| exit 1 | |
| fi | |
| bun run release:ci -- "${TAG_VERSION}" |