Skip to content

feat: update databases #283

feat: update databases

feat: update databases #283

Workflow file for this run

name: Publish to npm
on:
push:
paths:
- 'package.json'
workflow_dispatch:
jobs:
publish-npm:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.getversion.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
registry-url: https://registry.npmjs.org/
- name: npm install
run: npm ci
- name: npm run build
run: npm run build
- name: npm run test
run: npm run test
- name: Get version
id: getversion
run: echo version=`cat package.json | jq -r ".version"` >> $GITHUB_OUTPUT
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
pr-to-hsm-stage:
runs-on: ubuntu-latest
needs: publish-npm
steps:
- name: Checkout HoshimiStage
uses: actions/checkout@v3
with:
repository: MalitsPlus/HoshimiStage
path: HoshimiStage
token: ${{ secrets.PAT_TOKEN }}
ref: main
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Commit PR to sakura-love
run: |
version=${{ needs.publish-npm.outputs.version }}
echo "new version: ${version}"
cd HoshimiStage
git switch -c "venus_${version}"
python upgrade_venus.py ${version}
git config user.name "hoshimi-venus"
git config user.email "[email protected]"
git add .
git commit -m 'build: upgrade venus'
git push origin "venus_${version}"
echo ${{ secrets.PAT_TOKEN }} | gh auth login --with-token
gh pr create --base "main" --head "venus_${version}" -l "venus" --title "upgrade venus to ${version}" --body "***This pull-request was automatically triggered by [VenusSysLib](https://github.com/MalitsPlus/VenusSysLib).***"