From cfe94085d41a2414c3440a20b92807a3fdb505d5 Mon Sep 17 00:00:00 2001 From: Marika Marszalkowski <868536+marikaner@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:16:02 +0200 Subject: [PATCH] chore: Fix release pipeline (#132) * wip * go * fix naming * dummy * fix changelog * ghj * Revert "ghj" This reverts commit 2d8fbb0c9b877b3ee09cf7aaa253d07f9423a083. * version * Revert "version" This reverts commit 23aaedef8d8f7fe4a7668bbf07f643e5246a3706. * use bump + commit and tag * adjust runs * ls * gfd * gdf * v0.2.0 * Revert "v0.2.0" This reverts commit 21c0e9b88f8fb97a2497913ea0b758f2e9d2e193. * v0.2.0 * Revert "v0.2.0" This reverts commit d0192e9b42ff07ad8c1c5da5d74f2d6b3ec2cd96. * v0.2.0 * fsd * Revert "v0.2.0" This reverts commit 1ce8b8c9a4704336e5f0f62eaf99dbfa2b86da4c. * v0.2.0 * Revert "v0.2.0" This reverts commit dac92cf76045922fed74b79be58f8d123d985bab. * v0.2.0 * Revert "v0.2.0" This reverts commit 00d5367cc1bdda807fca78729ed94054acddfc74. * v0.2.0 * Revert "v0.2.0" This reverts commit f7dac4fe02c1acfe78104c6e3ae43d5647990c8f. * v0.2.0 * Revert "v0.2.0" This reverts commit fb491c046fecfb2f2dbba5e85aca7646a6d70e38. * v0.2.0 * adjust bump script * Revert "v0.2.0" This reverts commit 2c9dbf83a70c6e9c8c00bd8e3a213a8362f7b80d. * Update .github/workflows/bump.yml * Update .github/workflows/bump.yml * Update .github/workflows/draft-release.yml * Update .github/workflows/draft-release.yml * Update sample-code/src/foundation-models-openai.ts * Use main --------- Co-authored-by: ai-sdk-js Co-authored-by: sap-ai-sdk --- .github/workflows/build.yml | 2 +- .github/workflows/bump.yml | 26 +++++++++++--------------- .github/workflows/draft-release.yml | 10 ++++------ packages/core/CHANGELOG.md | 4 ---- 4 files changed, 16 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5212cbda..718994f5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v2 + - uses: pnpm/action-setup@v3 with: version: ${{ vars.PNPM_VERSION }} - uses: actions/setup-node@v4 diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index 11f16729..7ee54549 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -7,9 +7,6 @@ on: description: Mandatory, when bumping a major version. Semver compatible version string (X.Y.Z). Must not be set for patch and minor version releases. required: false -env: - INPUT_MAJOR_VERSION: ${{ inputs.majorVersion }} - jobs: bump: runs-on: ubuntu-latest @@ -18,7 +15,7 @@ jobs: with: token: ${{ secrets.GH_CLOUD_SDK_JS_ADMIN_WRITE_TOKEN }} ref: 'main' - - uses: pnpm/action-setup@v2 + - uses: pnpm/action-setup@v3 with: version: ${{ vars.PNPM_VERSION }} - uses: actions/setup-node@v4 @@ -26,14 +23,13 @@ jobs: node-version: ${{ vars.DEFAULT_NODE_VERSION }} cache: 'pnpm' - run: pnpm install --frozen-lockfile - - name: Setup git - run: | - git config --global user.email "ai-sdk-js@github.com" - git config --global user.name "ai-sdk-js" - - name: Bump version - run: pnpm changeset version - - name: Remove changelog files - (TODO) Remove this step when changeset version is fixed - run: rm -rf **/CHANGELOG.md - - name: Push - run: | - git push --follow-tags + - uses: sap/cloud-sdk-js/.github/actions/changesets-fixed-version-bump@main + name: bump version + id: bump + with: + majorVersion: ${{ inputs.majorVersion }} + - uses: sap/cloud-sdk-js/.github/actions/commit-and-tag@main + name: Commit and tag + with: + version: ${{ steps.bump.outputs.version }} + user-name: sap-ai-sdk diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index 3479ab50..03297ab3 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -20,14 +20,12 @@ jobs: - name: install and build run: pnpm install --frozen-lockfile - # TODO: Reuse step for GA release - # - uses: sap/cloud-sdk-js/.github/actions/get-changelog@main - # name: Get Changelog - # id: get-changelog + - uses: sap/cloud-sdk-js/.github/actions/merge-changelogs@main + name: merge changelogs + id: merge-changelogs - uses: ncipollo/release-action@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: draft: true - body: 'SAP Cloud SDK for AI Beta release' - # body: ${{ steps.get-changelog.outputs.changelog }} + body: ${{ steps.merge-changelogs.outputs.changelog }} diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 0fc243f2..427a9f00 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,7 +1,3 @@ # @sap-ai-sdk/core ## 0.1.0 - -### Minor Changes - -- 4d5edc7: [New Feature] test