From 90ec4a32f9d313865b12f157f3ba4e3fd8e80087 Mon Sep 17 00:00:00 2001 From: NickChecan Date: Thu, 9 Apr 2026 07:51:15 -0500 Subject: [PATCH 1/3] chore(common): add ci and semantic release --- .github/workflows/pipeline.yaml | 102 ++++++++++++++++++++++++++++++++ .releaserc.json | 31 ++++++++++ manifest.yml | 8 +++ 3 files changed, 141 insertions(+) create mode 100644 .github/workflows/pipeline.yaml create mode 100644 .releaserc.json create mode 100644 manifest.yml diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml new file mode 100644 index 0000000..4456771 --- /dev/null +++ b/.github/workflows/pipeline.yaml @@ -0,0 +1,102 @@ +name: Pipeline + +on: + push: + branches: + - main + pull_request: + +jobs: + unit-test: + name: Unit Test + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Run unit tests + run: make unit-test + + smoke-test: + name: Smoke Test + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.13" + + - name: Run smoke tests + run: make smoke-test + + package-buildpack: + name: Package Buildpack + runs-on: ubuntu-latest + needs: + - unit-test + - smoke-test + + steps: + - name: Check out repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.22" + + - name: Install buildpack-packager + run: go install github.com/cloudfoundry/libbuildpack/packager/buildpack-packager@latest + + - name: Package buildpack + run: buildpack-packager build -cached -any-stack + + - name: Upload packaged buildpack + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + uses: actions/upload-artifact@v4 + with: + name: packaged-buildpack + path: "*.zip" + if-no-files-found: error + + release-buildpack: + name: Release Buildpack + runs-on: ubuntu-latest + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + needs: + - package-buildpack + permissions: + contents: write + issues: write + pull-requests: write + + steps: + - name: Check out repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Download packaged buildpack + uses: actions/download-artifact@v4 + with: + name: packaged-buildpack + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: "22" + + - name: Install semantic-release + run: npm install --no-save semantic-release @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/github conventional-changelog-conventionalcommits + + - name: Publish semantic release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npx semantic-release diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..3717e78 --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,31 @@ +{ + "branches": [ + "main" + ], + "tagFormat": "v${version}", + "plugins": [ + [ + "@semantic-release/commit-analyzer", + { + "preset": "conventionalcommits" + } + ], + [ + "@semantic-release/release-notes-generator", + { + "preset": "conventionalcommits" + } + ], + [ + "@semantic-release/github", + { + "assets": [ + { + "path": "*.zip", + "label": "Packaged buildpack" + } + ] + } + ] + ] +} diff --git a/manifest.yml b/manifest.yml new file mode 100644 index 0000000..db320f0 --- /dev/null +++ b/manifest.yml @@ -0,0 +1,8 @@ +--- +language: python-uv + +include_files: + - bin/compile + - bin/detect + - bin/release + - manifest.yml From 986f596b87487f8a2395b330ad847103b2990cc9 Mon Sep 17 00:00:00 2001 From: NickChecan Date: Thu, 9 Apr 2026 07:56:43 -0500 Subject: [PATCH 2/3] fix(common): add version file for buildpack package --- .github/workflows/pipeline.yaml | 19 +++++++------------ .releaserc.json | 6 ++++++ VERSION | 1 + manifest.yml | 1 + 4 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 VERSION diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index 4456771..2b7359a 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -58,14 +58,6 @@ jobs: - name: Package buildpack run: buildpack-packager build -cached -any-stack - - name: Upload packaged buildpack - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - uses: actions/upload-artifact@v4 - with: - name: packaged-buildpack - path: "*.zip" - if-no-files-found: error - release-buildpack: name: Release Buildpack runs-on: ubuntu-latest @@ -83,10 +75,13 @@ jobs: with: fetch-depth: 0 - - name: Download packaged buildpack - uses: actions/download-artifact@v4 + - name: Set up Go + uses: actions/setup-go@v5 with: - name: packaged-buildpack + go-version: "1.22" + + - name: Install buildpack-packager + run: go install github.com/cloudfoundry/libbuildpack/packager/buildpack-packager@latest - name: Set up Node.js uses: actions/setup-node@v4 @@ -94,7 +89,7 @@ jobs: node-version: "22" - name: Install semantic-release - run: npm install --no-save semantic-release @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/github conventional-changelog-conventionalcommits + run: npm install --no-save semantic-release @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/github @semantic-release/exec conventional-changelog-conventionalcommits - name: Publish semantic release env: diff --git a/.releaserc.json b/.releaserc.json index 3717e78..c5005c7 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -16,6 +16,12 @@ "preset": "conventionalcommits" } ], + [ + "@semantic-release/exec", + { + "prepareCmd": "printf '%s\\n' <%= nextRelease.version %> > VERSION && buildpack-packager build -cached -any-stack" + } + ], [ "@semantic-release/github", { diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..77d6f4c --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.0.0 diff --git a/manifest.yml b/manifest.yml index db320f0..9be5cef 100644 --- a/manifest.yml +++ b/manifest.yml @@ -2,6 +2,7 @@ language: python-uv include_files: + - VERSION - bin/compile - bin/detect - bin/release From 77fd12d5d9d6e038cda39399f8b9b028907899f4 Mon Sep 17 00:00:00 2001 From: NickChecan Date: Thu, 9 Apr 2026 08:06:45 -0500 Subject: [PATCH 3/3] fix(common): add required properties to manifest --- manifest.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/manifest.yml b/manifest.yml index 9be5cef..fc9586f 100644 --- a/manifest.yml +++ b/manifest.yml @@ -1,5 +1,8 @@ --- language: python-uv +default_versions: [] +dependency_deprecation_dates: [] +dependencies: [] include_files: - VERSION