diff --git a/.github/workflows/build-vscode-release.reusable.yaml b/.github/workflows/build-vscode-release.reusable.yaml index cb869d0c6..65f0dac68 100644 --- a/.github/workflows/build-vscode-release.reusable.yaml +++ b/.github/workflows/build-vscode-release.reusable.yaml @@ -12,7 +12,7 @@ concurrency: jobs: build: - # if: false + if: false runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index de3fdafd9..244fe4db8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,7 @@ on: tags: - "test-release/*.*" - "*.*" + branches: [sam/vsc-release2] concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -99,21 +100,29 @@ jobs: build-typescript-release: uses: ./.github/workflows/build-typescript-release.reusable.yaml + build-vscode-release: + uses: ./.github/workflows/build-vscode-release.reusable.yaml + # placeholder fan-in step - assert-all-builds-passed: + all-builds: + name: Assert all builds passed runs-on: ubuntu-latest needs: - build-python-release - - build-typescript-release - build-ruby-release + - build-typescript-release + - build-vscode-release - build-wasm + outputs: + should-run-publish-job: ${{ github.ref_type == 'tag' }} + should-run-publish-step: ${{ startsWith(github.ref, 'refs/tags/') && !startsWith(github.ref, 'refs/tags/test-release') }} steps: - run: true publish-to-pypi: environment: release - if: github.ref_type == 'tag' - needs: [assert-all-builds-passed] + needs: [all-builds] + if: needs.all-builds.outputs.should-run-publish-job runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -141,7 +150,7 @@ jobs: # authz is managed via OIDC configured at https://pypi.org/manage/project/baml-py/settings/publishing/ # it is pinned to this github actions filename, so renaming this file is not safe!! - name: Publish package to PyPI - if: ${{ startsWith(github.ref, 'refs/tags/') && !startsWith(github.ref, 'refs/tags/test-release') }} + if: needs.all-builds.outputs.should-run-publish-step uses: PyO3/maturin-action@v1 with: command: upload @@ -149,8 +158,8 @@ jobs: publish-to-npm: environment: release - if: github.ref_type == 'tag' - needs: [assert-all-builds-passed] + needs: [all-builds] + if: needs.all-builds.outputs.should-run-publish-job runs-on: ubuntu-latest env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} @@ -190,7 +199,7 @@ jobs: working-directory: engine/language_client_typescript - name: Publish - if: ${{ startsWith(github.ref, 'refs/tags/') && !startsWith(github.ref, 'refs/tags/test-release') }} + if: needs.all-builds.outputs.should-run-publish-step run: | npm publish --access public working-directory: engine/language_client_typescript @@ -200,8 +209,8 @@ jobs: publish-to-rubygems: environment: release - if: github.ref_type == 'tag' - needs: [assert-all-builds-passed] + needs: [all-builds] + if: needs.all-builds.outputs.should-run-publish-job runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -220,6 +229,7 @@ jobs: merge-multiple: true - working-directory: engine/language_client_ruby + if: needs.all-builds.outputs.should-run-publish-step run: | set -euxo pipefail find pkg @@ -227,63 +237,10 @@ jobs: gem push $i done - # publish-vscode: - # environment: release - # needs: [build-release, build-wasm] - # if: github.ref_type == 'tag' - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - - # # Get all the artifacts - # - name: Get artifact - # uses: actions/download-artifact@v4 - # with: - # name: baml-vscode.vsix - # path: typescript/vscode-ext/packages - # - name: Get artifact - # uses: actions/download-artifact@v4 - # with: - # name: baml-out - # path: typescript/vscode-ext/packages/vscode/out - # - name: Get artifact - # uses: actions/download-artifact@v4 - # with: - # name: language-server - # path: typescript/vscode-ext/packages/language-server/out - # - name: Get artifact - # uses: actions/download-artifact@v4 - # with: - # pattern: vscode-playground - # path: typescript/vscode-ext/packages/web-panel/dist - - # - name: setup pnpm - # uses: pnpm/action-setup@v4 - # with: - # version: 9.0.6 - # package_json_file: typescript/package.json - # run_install: false - # # Set up Node.js - # - name: Setup Node.js - # uses: actions/setup-node@v4 - # with: - # cache: "pnpm" - # node-version: 20 - # cache-dependency-path: typescript/pnpm-lock.yaml - - # - name: Install Dependencies - # run: pnpm install --frozen-lockfile - # working-directory: typescript/ - # - name: Publish - # if: ${{ startsWith(github.ref, 'refs/tags/') && !startsWith(github.ref, 'refs/tags/test-release') }} - # run: | - # pnpm run vscode:publish --no-git-tag-version -p ${{ secrets.VSCODE_PAT }} - # working-directory: typescript/vscode-ext/packages - - release-github: + publish-to-github: + needs: [all-builds] + if: needs.all-builds.outputs.should-run-publish-job runs-on: ubuntu-latest - if: github.ref_type == 'tag' - needs: [assert-all-builds-passed] steps: - uses: actions/checkout@v4 @@ -298,7 +255,50 @@ jobs: merge-multiple: true - name: Create Release + if: needs.all-builds.outputs.should-run-publish-step uses: mikepenz/action-gh-release@v1 #softprops/action-gh-release with: body: ${{steps.latest_release.outputs.changelog}} files: gh-artifacts/* + + publish-to-open-vsx: + needs: [all-builds] + runs-on: ubuntu-latest + if: needs.all-builds.outputs.should-run-publish-job + steps: + - uses: actions/checkout@v4 + - uses: jdx/mise-action@v2 + - name: Install Dependencies + run: pnpm install --frozen-lockfile + working-directory: typescript/ + - uses: actions/download-artifact@v4 + with: + name: baml-vscode-vsix + path: typescript/vscode-ext/packages/out/ + - name: Publish to open-vsx + run: | + cd typescript/vscode-ext/packages + pnpm ovsx publish --packagePath ./out/*.vsix + env: + OVSX_PAT: ${{ secrets.OVSX_PAT }} + + publish-to-vscode-marketplace: + needs: [all-builds] + runs-on: ubuntu-latest + if: needs.all-builds.outputs.should-run-publish-job + steps: + - uses: actions/checkout@v4 + - uses: jdx/mise-action@v2 + - name: Install Dependencies + run: pnpm install --frozen-lockfile + working-directory: typescript/ + - uses: actions/download-artifact@v4 + with: + name: baml-vscode-vsix + path: typescript/vscode-ext/packages/out/ + - name: Publish to VSCode Marketplace + run: | + cd typescript/vscode-ext/packages + pnpm vsce publish --packagePath ./out/*.vsix + env: + VSCE_PAT: ${{ secrets.VSCODE_PAT }} \ No newline at end of file diff --git a/typescript/vscode-ext/packages/package.json b/typescript/vscode-ext/packages/package.json index 5b27aec19..04057c9fa 100644 --- a/typescript/vscode-ext/packages/package.json +++ b/typescript/vscode-ext/packages/package.json @@ -1,8 +1,8 @@ { - "name": "baml-extension-preview", - "displayName": "baml-preview", + "name": "baml-extension", + "displayName": "Baml", "description": "BAML is a DSL for AI applications.", - "version": "0.69.5", + "version": "0.70.1", "publisher": "Boundary", "repository": "https://github.com/BoundaryML/baml", "homepage": "https://www.boundaryml.com",