Skip to content

fix trigger svf-python #1770

fix trigger svf-python

fix trigger svf-python #1770

name: svf-build
# Triggers the workflow on push or pull request events
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: publish-svf-lib
run: |
if [ "$RUNNER_OS" = "Linux" ]; then sudo apt-get update ; fi
cat package.json
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
trigger-svf-python:
if: github.event_name == 'push' # Only run on push events
needs: build
runs-on: ubuntu-latest
steps:
- name: Trigger SVF-Python workflow
run: |
git clone https://github.com/SVF-tools/SVF-Python.git
cd SVF-Python
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit --allow-empty -m "trigger: new version of SVF-npm published"
git push https://yuleisui:${{secrets.yulei_git_key}}@github.com/SVF-tools/SVF-Python.git HEAD:main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}