Skip to content

Commit

Permalink
feat: update CI to use GitHub actions (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
ForbesLindesay committed Aug 31, 2022
1 parent 91b7b4c commit 14a9a38
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 14 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/rollingversions-canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish Canary

on:
push:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn build
- run: yarn test

publish-canary:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: yarn build
- run: npx rollingversions publish --canary $GITHUB_RUN_NUMBER
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
38 changes: 38 additions & 0 deletions .github/workflows/rollingversions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release
on:
repository_dispatch:
types: [rollingversions_publish_approved]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn build
- run: yarn test

publish:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: yarn build
- run: npx rollingversions publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test

on:
pull_request:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn build
- run: yarn test
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ components
node_modules
test
.gitignore
.travis.yml
.github
component.json
coverage
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Bare bones Promises/A+ implementation",
"main": "index.js",
"scripts": {
"prepublish": "node build",
"build": "node build",
"pretest": "node build",
"pretest-resolve": "node build",
"pretest-extensions": "node build",
Expand Down

0 comments on commit 14a9a38

Please sign in to comment.