-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): dependabot and release workflows
- Loading branch information
1 parent
97f8d76
commit df4852f
Showing
5 changed files
with
126 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "pnpm" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
time: "04:00" | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope | ||
groups: | ||
linting-dx-tools: | ||
patterns: | ||
- "*lint*" # eslint, eslint-*, vue-eslint-parser, lint-staged, @commitlint/*, @typescript-eslint/* | ||
- "prettier" | ||
- "husky" | ||
- "@vue/tsconfig" | ||
- "*babel*" # babel-*, @vue/babel-preset-app, @babel/* | ||
update-types: | ||
- "minor" | ||
- "patch" | ||
testing-tools: | ||
patterns: | ||
- "@vue/test-utils" | ||
- "vitest" | ||
update-types: | ||
- "minor" | ||
- "patch" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# From https://github.com/remirror/template/blob/4f8c5f5629a081217672a8cce1df085510f43913/.github/actions/pnpm/action.yml | ||
name: pnpm installation | ||
description: Install and audit dependencies for pnpm | ||
inputs: | ||
cache: # id of input | ||
description: The location of the pnpm cache | ||
required: true | ||
default: .pnpm-store | ||
version: # id of input | ||
description: The version to use | ||
required: false | ||
default: 6.10.0 | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: install pnpm | ||
run: npm install pnpm@${{ inputs.version }} -g | ||
shell: bash | ||
|
||
- name: setup pnpm config | ||
run: pnpm config set store-dir ${{ inputs.cache }} | ||
shell: bash | ||
|
||
- name: install dependencies | ||
run: pnpm install --shamefully-hoist | ||
shell: bash | ||
|
||
# Avoid running husky hooks on Github | ||
# http://typicode.github.io/husky/how-to.html | ||
env: | ||
HUSKY: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# **** AUTOMERGE **** | ||
# Merge automatically the PR that contain a minor or patch update on the dependency you define in env.DEPENDENCY | ||
# - Inspiration: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions#enable-auto-merge-on-a-pull-request | ||
|
||
name: Dependabot auto-merge | ||
on: pull_request | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
dependabot: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor == 'dependabot[bot]' }} | ||
steps: | ||
- name: Dependabot metadata | ||
id: metadata | ||
uses: dependabot/fetch-metadata@v1.1.1 | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
- name: Enable auto-merge for Dependabot PRs | ||
if: ${{contains(steps.metadata.outputs.dependency-names, env.DEPENDENCY) && (steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor')}} | ||
run: gh pr merge --auto --merge "$PR_URL" | ||
env: | ||
DEPENDENCY: "vue" | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.DEPENDABOT_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Release CI | ||
|
||
on: | ||
push: | ||
branches: [main, next, beta] | ||
pull_request: | ||
branches: [main, next, beta] | ||
|
||
env: | ||
PNPM_CACHE_FOLDER: .pnpm-store | ||
HUSKY: 0 # Bypass husky commit hook for CI | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: pnpm | ||
- name: Build lib | ||
run: npm run build | ||
- name: Test run | ||
run: npm run test | ||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npx semantic-release@18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters