From 710aa31ce0cedc6736d48cc5c7f218694bf84059 Mon Sep 17 00:00:00 2001 From: 3y3 <3y3@ya.ru> Date: Mon, 18 Nov 2024 19:01:22 +0300 Subject: [PATCH] chore: Add deps update workflow --- .github/workflows/deps.yml | 33 +++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deps.yml diff --git a/.github/workflows/deps.yml b/.github/workflows/deps.yml new file mode 100644 index 00000000..9d0f65ff --- /dev/null +++ b/.github/workflows/deps.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7cc971bc..e8c7b89e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: