Skip to content

Commit

Permalink
Switch CI to GitHub Actions (#48)
Browse files Browse the repository at this point in the history
Co-authored-by: Fabrizio Ferrai <[email protected]>
  • Loading branch information
klntsky and f-f authored Apr 16, 2021
1 parent 962fa47 commit 8925f21
Show file tree
Hide file tree
Showing 4 changed files with 1,086 additions and 52 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: build
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: "14"

- uses: purescript-contrib/setup-purescript@main

- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('./**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache PureScript dependencies
uses: actions/cache@v2
with:
key: ${{ runner.os }}-spago-${{ hashFiles('./**/*.dhall') }}
path: |
.spago
output
- name: Install
run: |
npm ci
spago install
- name: Build
run: |
npm run build
npm test
spago docs --no-search
./dist/purescript-docs-search build-index
52 changes: 52 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: release
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: "14"

- uses: purescript-contrib/setup-purescript@main

- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('./**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache PureScript dependencies
uses: actions/cache@v2
with:
key: ${{ runner.os }}-spago-${{ hashFiles('./**/*.dhall') }}
path: |
.spago
output
- name: Build
run: |
npm ci
spago install
npm run build
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
dist/docs-search-app.js
dist/purescript-docs-search
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to NPM
shell: bash
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_TOKEN }}
run: npm publish --non-interactive --access public
52 changes: 0 additions & 52 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 8925f21

Please sign in to comment.