Skip to content

Commit

Permalink
skip the vscode-only job
Browse files Browse the repository at this point in the history
  • Loading branch information
sxlijin committed Dec 6, 2024
1 parent 60d6bb9 commit a695f68
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 70 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-vscode-release.reusable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:

jobs:
build:
# if: false
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
132 changes: 66 additions & 66 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
tags:
- "test-release/*.*"
- "*.*"
branches: [sam/vsc-release2]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -141,16 +150,16 @@ 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
args: dist/*

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 }}
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -220,70 +229,18 @@ 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
for i in $(ls pkg/*.gem); do
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

Expand All @@ -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 }}
6 changes: 3 additions & 3 deletions typescript/vscode-ext/packages/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit a695f68

Please sign in to comment.