Skip to content

Commit

Permalink
update pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Nov 2, 2024
1 parent c390340 commit b534d20
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 31 deletions.
14 changes: 0 additions & 14 deletions .github/scripts/link.mjs

This file was deleted.

24 changes: 18 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,32 +36,44 @@ jobs:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: ⬇️ Checkout Code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: 📦 Setup pnpm
uses: pnpm/action-setup@v4
with:
ref: 'main'
fetch-depth: 0
- uses: actions/setup-node@v4
version: 9

- name: 🐢 Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
node-version-file: '.nvmrc'
cache: 'pnpm'

- 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 "[email protected]"
git config --global user.name "WebdriverIO Release Bot"
- name: Install Dependencies
run: npm ci
run: pnpm install

- 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:
Expand Down
29 changes: 19 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,28 @@ jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
- name: ⬇️ Checkout Code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: 📦 Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: 🐢 Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
node-version-file: '.nvmrc'
cache: 'pnpm'

- name: ⬇️ Install Dependencies
run: pnpm install

- name: 🏗️ Build
run: pnpm run build

- name: 🧪 Run Tests
uses: GabrielBB/xvfb-action@v1
with:
run: |
ln -s ../ ./node_modules/wdio-vite-service
npm test
run: npm test

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"release:minor": "npm run release -- minor",
"release:major": "npm run release -- major",
"test": "run-s test:*",
"test:setup": "node ./.github/scripts/link.mjs",
"test:lint": "eslint",
"test:e2e": "cd example && npx wdio run ./wdio.conf.ts",
"watch": "npm run build -- --watch"
Expand Down

0 comments on commit b534d20

Please sign in to comment.