zed-industries / extensions

Extensions for the Zed editor
789 stars 322 forks source link

introduce auto-generated CHANGELOG.md #1054

Closed BH-ITAY closed 1 month ago

BH-ITAY commented 1 month ago

Check for existing issues

Misc notes

implementing a simple semver commit conventions will have great value. New users will be able to see in the CHANGELOG newly introduced extentions.

All needed is updating the contribution template and ensuring merge commits are using conventional commits.

BH-ITAY commented 1 month ago

Until I will find the time to fork this project and submit PR here is a short example of the ci.yaml file :)

name: CI

on:
  pull_request:
  push:
    branches:
      - "main"

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

env:
  ZED_EXTENSION_CLI_SHA: 2e87e1d26e86d0ce6f3d94b5d72782636330d24f

jobs:
  package:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo
        uses: actions/checkout@v4
        with:
          clean: false
          fetch-depth: 0

      - uses: pnpm/action-setup@v3
        with:
          version: 9

      - uses: actions/setup-node@v3
        with:
          node-version: "20"
          cache: "pnpm"

      - name: Cache zed-extension CLI
        id: cache-zed-extension
        uses: actions/cache@v3
        with:
          path: |
            zed-extension
          key: zed-extension-${{ env.ZED_EXTENSION_CLI_SHA }}

      - name: Download zed-extension CLI if not cached
        if: steps.cache-zed-extension.outputs.cache-hit != 'true'
        run: |
          wget --quiet "https://zed-extension-cli.nyc3.digitaloceanspaces.com/$ZED_EXTENSION_CLI_SHA/x86_64-unknown-linux-gnu/zed-extension"
          chmod +x zed-extension

      - name: Install dependencies
        run: pnpm install

      - name: Build
        run: pnpm build

      - name: Run tests
        run: pnpm test

      - name: Cache extension build dependencies
        uses: actions/cache@v3
        with:
          key: cache-build-dependencies
          path: |
            ./scratch

      - name: Package extensions
        run: pnpm package-extensions
        env:
          SHOULD_PUBLISH: ${{ github.ref_name == 'main' }}
          S3_BUCKET: ${{ secrets.S3_BUCKET }}
          S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
          S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}

      - name: Enforce sorted `extensions.toml`
        run: git diff --exit-code -- extensions.toml

      - name: Enforce sorted `.gitmodules`
        run: git diff --exit-code -- .gitmodules

      - name: Semantic Release
        id: semantic_release
        uses: cycjimmy/semantic-release-action@v3
        with:
          extra_plugins: |
            @semantic-release/changelog
            @semantic-release/git
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
maxdeviant commented 1 month ago

Thanks for the suggestion, but I don't think this is something we're going to do.