Skip to content

Commit

Permalink
chore: Add deps update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
3y3 committed Nov 18, 2024
1 parent 7429aaf commit 710aa31
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI

on: workflow_dispatch

inputs:
package:
required: true
version:
default: "latest"

jobs:
prerelease:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node 18
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- run: npm ci
- name: Update package
run: npm i ${{ inputs.package }}@${{ inputs.version }}
- name: Create and publish PR
run: |
VERSION=$(npm explore --no-workspaces @diplodoc/transform "node -pe 'require(\"./package.json\").version'" --shell sh)
git push -f origin :ci/update-deps/${{ inputs.package }}-$VERSION
git checkout -b ci/update-deps/${{ inputs.package }}-$VERSION
git add package.json package-lock.json
git commit -m "deps: Update @diplodoc/transform to $VERSION"
git push -u origin/ci/update-deps/${{ inputs.package }}-$VERSION
gh pr create -f
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
token: ${{secrets.YC_UI_BOT_GITHUB_TOKEN}}
release-type: node
package-name: ${{steps.package.outputs.name}}
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"perf","section":"Performance Improvements","hidden":false}]'
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"perf","section":"Performance Improvements","hidden":false},{"type":"deps","section":"Dependency update","hidden":false}]'
bump-minor-pre-major: true
- run: npm publish
env:
Expand Down

0 comments on commit 710aa31

Please sign in to comment.