Skip to content

Commit

Permalink
Updating release script (#678)
Browse files Browse the repository at this point in the history
  • Loading branch information
hellovai authored Jun 14, 2024
1 parent 31e275e commit 61a7137
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/primary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: BAML Runtime

on:
pull_request:
paths:
- "engine/**"
- ".github/workflows/primary.yml"
branches:
- canary
push:
Expand Down Expand Up @@ -89,9 +86,6 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
workspaces: engine
- name: Build Rust
run: cargo build
working-directory: engine
- name: Test Rust
run: cargo test
working-directory: engine
25 changes: 20 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,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/test-release') }}
if: ${{ !startsWith(github.ref, 'refs/tags/test-release') }}
uses: pypa/gh-action-pypi-publish@release/v1

publish-to-npm:
Expand Down Expand Up @@ -242,11 +242,11 @@ jobs:
- name: Install dependencies
run: pnpm install
working-directory: engine/language_client_typescript

- uses: actions/download-artifact@v4
with:
name: bindings-*

- name: create npm dirs
run: pnpm napi create-npm-dirs
working-directory: engine/language_client_typescript
Expand Down Expand Up @@ -305,7 +305,22 @@ jobs:
run: pnpm install --frozen-lockfile
working-directory: typescript/
- name: Publish
if: ${{ !startsWith(github.ref, 'refs/tags/test-release') }}
if: ${{ !startsWith(github.ref, 'refs/tags/test-release') }}
run: |
pnpm run vscode:publish --pre-release --no-git-tag-version -p ${{ secrets.VSCODE_PAT }}
working-directory: typescript/vscode-ext/packages
working-directory: typescript/vscode-ext/packages

release-github:
runs-on: ubuntu-latest
needs: [publish-to-pypi, publish-to-npm, publish-vscode]
steps:
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
uses: mikepenz/[email protected] #softprops/action-gh-release
with:
body: ${{steps.github_release.outputs.changelog}}

0 comments on commit 61a7137

Please sign in to comment.