-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f744b5
commit 91d3693
Showing
5 changed files
with
152 additions
and
0 deletions.
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,3 @@ | ||
tidelift: "npm/edgedriver" | ||
open_collective: webdriverio | ||
github: [christian-bromann,webdriverio] |
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,7 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: npm | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
open-pull-requests-limit: 10 |
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,25 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: 💚 Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
- name: 🚧 Install Dependencies | ||
run: npm ci | ||
- name: 📦 Build | ||
run: npm run build | ||
- name: 🧪 Run Tests | ||
uses: GabrielBB/xvfb-action@v1 | ||
with: | ||
run: npm test |
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,70 @@ | ||
name: Manual NPM Publish | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
releaseType: | ||
description: "Release type - major, minor or patch" | ||
required: true | ||
type: choice | ||
default: "patch" | ||
options: | ||
- patch | ||
- minor | ||
- major | ||
distTag: | ||
description: 'NPM tag (e.g. use "next" to release a test version)' | ||
required: true | ||
default: 'latest' | ||
preRelease: | ||
description: If latest release was a pre-release (e.g. X.X.X-alpha.0) and you want to push another one, pick "yes" | ||
required: true | ||
type: choice | ||
default: "no" | ||
options: | ||
- "yes" | ||
- "no" | ||
|
||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NPM_CONFIG_PROVENANCE: true | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: 'main' | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: NPM Setup | ||
run: | | ||
npm set registry "https://registry.npmjs.org/" | ||
npm set //registry.npmjs.org/:_authToken $NPM_TOKEN | ||
npm whoami | ||
- name: Git Setup | ||
run: | | ||
git config --global user.email "bot@webdriver.io" | ||
git config --global user.name "WebdriverIO Release Bot" | ||
- name: Install Dependencies | ||
run: npm ci | ||
- name: Build | ||
run: npm run build | ||
- name: Release | ||
run: npx release-it ${{github.event.inputs.releaseType}} --github.release --ci --npm.skipChecks --no-git.requireCleanWorkingDir --npm.tag=${{github.event.inputs.distTag}} | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
if: ${{ github.event.inputs.preRelease == 'no' }} | ||
- name: Pre-Release | ||
run: npx release-it ${{github.event.inputs.releaseType}} --github.release --ci --npm.skipChecks --no-git.requireCleanWorkingDir --preRelease=alpha --github.preRelease --npm.tag=next | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
if: ${{ github.event.inputs.preRelease == 'yes' }} |
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,47 @@ | ||
# this workflow merges requests from Dependabot if tests are passing | ||
# ref https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions | ||
# and https://github.com/dependabot/fetch-metadata | ||
name: Auto-merge | ||
|
||
# `pull_request_target` means this uses code in the base branch, not the PR. | ||
on: pull_request_target | ||
|
||
# Dependabot PRs' tokens have read permissions by default and thus we must enable write permissions. | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
dependencies: | ||
runs-on: ubuntu-latest | ||
if: github.actor == 'dependabot[bot]' | ||
|
||
steps: | ||
- name: Fetch PR metadata | ||
id: metadata | ||
uses: dependabot/fetch-metadata@v1.6.0 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Wait for PR CI | ||
# Don't merge updates to GitHub Actions versions automatically. | ||
# (Some repos may wish to limit by version range (major/minor/patch), or scope (dep vs dev-dep), too.) | ||
if: contains(steps.metadata.outputs.package-ecosystem, 'npm') | ||
uses: lewagon/wait-on-check-action@v1.3.3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
wait-interval: 30 # seconds | ||
running-workflow-name: dependencies # wait for all checks except this one | ||
allowed-conclusions: success # all other checks must pass, being skipped or cancelled is not sufficient | ||
|
||
- name: Auto-merge dependabot PRs | ||
# Don't merge updates to GitHub Actions versions automatically. | ||
# (Some repos may wish to limit by version range (major/minor/patch), or scope (dep vs dev-dep), too.) | ||
if: contains(steps.metadata.outputs.package-ecosystem, 'npm') | ||
env: | ||
PR_URL: ${{ github.event.pull_request.html_url }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# The "auto" flag will only merge once all of the target branch's required checks | ||
# are met. Configure those in the "branch protection" settings for each repo. | ||
run: gh pr merge --auto --squash "$PR_URL" |