mirror of
https://github.com/rowtype-yoga/purescript-docs-search.git
synced 2024-08-17 00:20:27 +03:00
56 lines
1.3 KiB
YAML
56 lines
1.3 KiB
YAML
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: "18"
|
|
|
|
- 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.cjs
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Publish to NPM
|
|
shell: bash
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_TOKEN }}
|
|
run: |
|
|
mv ci-npmrc.txt .npmrc
|
|
npm ci
|
|
npm publish --non-interactive --access public
|