diff --git a/.github/workflows/bump_version.yml b/.github/workflows/bump_version.yml new file mode 100644 index 0000000..7f4318d --- /dev/null +++ b/.github/workflows/bump_version.yml @@ -0,0 +1,52 @@ +# Generated from xtask::workflows::extensions::bump_version within the Zed repository. +# Rebuild with `cargo xtask workflows`. +name: extensions::bump_version +on: + pull_request: + types: + - labeled + push: + branches: + - main + paths-ignore: + - .github/** + workflow_dispatch: {} +jobs: + determine_bump_type: + runs-on: namespace-profile-16x32-ubuntu-2204 + steps: + - id: get-bump-type + name: extensions::bump_version::get_bump_type + run: | + if [ "$HAS_MAJOR_LABEL" = "true" ]; then + bump_type="major" + elif [ "$HAS_MINOR_LABEL" = "true" ]; then + bump_type="minor" + else + bump_type="patch" + fi + echo "bump_type=$bump_type" >> $GITHUB_OUTPUT + shell: bash -euxo pipefail {0} + env: + HAS_MAJOR_LABEL: |- + ${{ (github.event.action == 'labeled' && github.event.label.name == 'major') || + (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'major')) }} + HAS_MINOR_LABEL: |- + ${{ (github.event.action == 'labeled' && github.event.label.name == 'minor') || + (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'minor')) }} + outputs: + bump_type: ${{ steps.get-bump-type.outputs.bump_type }} + call_bump_version: + needs: + - determine_bump_type + if: github.event.action != 'labeled' || needs.determine_bump_type.outputs.bump_type != 'patch' + uses: zed-industries/zed/.github/workflows/extension_bump.yml@main + secrets: + app-id: ${{ secrets.ZED_ZIPPY_APP_ID }} + app-secret: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }} + with: + bump-type: ${{ needs.determine_bump_type.outputs.bump_type }} + force-bump: true +concurrency: + group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}labels + cancel-in-progress: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 40699db..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,88 +0,0 @@ ---- -on: - push: - branches: [main] - pull_request: - branches: - - main - -name: CI - -jobs: - lint: - name: Lint - runs-on: ubuntu-latest - env: - RUSTFLAGS: -D warnings - steps: - - uses: actions/checkout@v4 - with: - # By default actions/checkout checks out a merge commit. Check out the PR head instead. - # https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit - ref: ${{ github.event.pull_request.head.sha }} - - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - toolchain: stable - target: wasm32-wasip2 - override: true - components: rustfmt, clippy - - name: Lint (clippy) - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all-features --all-targets - - name: Rustfmt Check - uses: actions-rust-lang/rustfmt@v1 - - build: - name: Build and test - runs-on: ubuntu-latest - env: - RUSTFLAGS: -D warnings - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - toolchain: 1.87 - target: wasm32-wasip2 - override: true - - name: Build extension - uses: actions-rs/cargo@v1 - with: - command: build - args: --target wasm32-wasip2 --all-features - - name: Install latest nextest release - uses: taiki-e/install-action@nextest - - name: Test with latest nextest release - uses: actions-rs/cargo@v1 - with: - command: nextest - args: run --all-features --profile ci - - commit-lint: - name: Verify Conventional Commits - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [20] - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Install pnpm - uses: pnpm/action-setup@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: "pnpm" - - name: Install dependencies - run: pnpm install - - name: Validate current commit (last commit) with commitlint - if: github.event_name == 'push' - run: pnpm commitlint --last --verbose - - name: Validate PR commits with commitlint - if: github.event_name == 'pull_request' - run: pnpm commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose diff --git a/.github/workflows/release_version.yml b/.github/workflows/release_version.yml new file mode 100644 index 0000000..f752931 --- /dev/null +++ b/.github/workflows/release_version.yml @@ -0,0 +1,13 @@ +# Generated from xtask::workflows::extensions::release_version within the Zed repository. +# Rebuild with `cargo xtask workflows`. +name: extensions::release_version +on: + push: + tags: + - v** +jobs: + call_release_version: + uses: zed-industries/zed/.github/workflows/extension_release.yml@main + secrets: + app-id: ${{ secrets.ZED_ZIPPY_APP_ID }} + app-secret: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }} diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml new file mode 100644 index 0000000..81ba76c --- /dev/null +++ b/.github/workflows/run_tests.yml @@ -0,0 +1,16 @@ +# Generated from xtask::workflows::extensions::run_tests within the Zed repository. +# Rebuild with `cargo xtask workflows`. +name: extensions::run_tests +on: + pull_request: + branches: + - '**' + push: + branches: + - main +jobs: + call_extension_tests: + uses: zed-industries/zed/.github/workflows/extension_tests.yml@main +concurrency: + group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}pr + cancel-in-progress: true