Skip to content

Commit

Permalink
Move to GitHub actions (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann authored Nov 10, 2020
1 parent 4dfcfee commit 007ca46
Show file tree
Hide file tree
Showing 7 changed files with 1,006 additions and 2,731 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.json]
[{*.json,*.yml}]
indent_style = space
indent_size = 2

Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Manual NPM Publish

on:
workflow_dispatch:
inputs:
releaseType:
description: 'Release type - major, minor or patch'
required: true
default: 'patch'
distTag:
description: 'NPM tag (e.g. use "next" to release a test version)'
required: true
default: 'latest'

env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}

jobs:
authorize:
runs-on: ubuntu-latest
steps:
- uses: octokit/request-action@v2.0.0
with:
route: GET /orgs/:organisation/teams/:team/memberships/${{ github.actor }}
team: technical-steering-committee
organisation: webdriverio
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
release:
needs: [authorize]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: 'master'
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: 14.x
- 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 "christian+webdriverio-release@saucelabs.com"
git config --global user.name "WebdriverIO Release Bot"
- name: Install Dependencies
run: npm ci
- name: Release
run: npm run release:ci -- ${{github.event.inputs.releaseType}}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Test

on:
push:
branches:
- master
pull_request:

jobs:
linux:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm install
- name: Run Tests
run: npm test
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 007ca46

Please sign in to comment.