Skip to content

Commit

Permalink
Update action workflow for each sub-project
Browse files Browse the repository at this point in the history
  • Loading branch information
ypkang committed Sep 8, 2024
1 parent 0635b57 commit 115b501
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 55 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Release to PyPI

on: workflow_dispatch
# on:
# push:
# tags:
# - 'v*.*.*'

jobs:
release:
Expand All @@ -25,29 +21,23 @@ jobs:
python -m pip install --upgrade pip
pip install setuptools wheel twine
# - name: Extract version from tag
# id: get_version
# run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}

# - name: Update version in setup.py
# run: |
# sed -i 's/VERSION = ".*"/VERSION = "${{ steps.get_version.outputs.VERSION }}"/' setup.py

- name: Build package
working-directory: jac-mtllm
run: python setup.py sdist bdist_wheel

- name: Publish package to PyPI
working-directory: jac-mtllm
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*

- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
# - name: Create GitHub Release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# draft: false
# prerelease: false
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ jobs:
with:
python-version: '3.12'
- name: Install Poetry
working-directory: jaclang
run: |
pip install poetry
- name: Build and publish package
working-directory: jaclang
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry build
poetry publish
- run: pip install githubrelease
- run: python scripts/gh_release.py
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
# - run: pip install githubrelease
# - run: python scripts/gh_release.py
# env:
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@ jobs:
with:
python-version: '3.12'
- name: Install Poetry
working-directory: jac-mtllm
run: |
pip install poetry
- name: Build package
working-directory: jac-mtllm
run: poetry build
- name: Publish package
working-directory: jac-mtllm
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish
continue-on-error: true
- run: pip install githubrelease markdown-to-json
- run: python scripts/gh_release.py
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
# - run: pip install githubrelease markdown-to-json
# - run: python scripts/gh_release.py
# env:
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
name: Run Plugin Tests
name: Run tests for jac-cloud

on:
pull_request:
paths:
- "jac-cloud/**"
push:
branches:
- main
paths:
- "jac-cloud/**"

jobs:
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -36,6 +41,7 @@ jobs:
python-version: 3.12.4

- name: Install dependencies
working-directory: jac-cloud
run: |
python -m pip install --upgrade pip
cd ..
Expand All @@ -47,6 +53,7 @@ jobs:
pip install -e .
- name: Run tests
working-directory: jac-cloud
run: |
jac clean
jac tool gen_parser
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
25 changes: 0 additions & 25 deletions jaclang/.github/workflows/pre_commit.yml

This file was deleted.

0 comments on commit 115b501

Please sign in to comment.