mirror of
https://github.com/unraid/api.git
synced 2026-04-30 04:01:10 -05:00
103 lines
2.4 KiB
YAML
103 lines
2.4 KiB
YAML
name: Production
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
jobs:
|
|
# test:
|
|
# runs-on: ubuntu-latest
|
|
|
|
# steps:
|
|
# - name: Checkout repo
|
|
# uses: actions/checkout@v1
|
|
|
|
# - name: Use Node.js ${{ matrix.node-version }}
|
|
# uses: actions/setup-node@v1
|
|
# with:
|
|
# node-version: ${{ matrix.node-version }}
|
|
|
|
# - name: Add SSH deploy key
|
|
# uses: shimataro/ssh-key-action@v2
|
|
# with:
|
|
# key: ${{ secrets.UNRAID_BOT_SSH_KEY }}
|
|
# known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
|
|
# - name: Installing node deps
|
|
# run: npm ci
|
|
|
|
# - name: Test
|
|
# run: npm test
|
|
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Add SSH deploy key
|
|
uses: shimataro/ssh-key-action@v2
|
|
with:
|
|
key: ${{ secrets.UNRAID_BOT_SSH_KEY }}
|
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
|
|
- name: Installing node deps
|
|
run: npm install
|
|
|
|
- name: Lint
|
|
run: npm run lint
|
|
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [lint]
|
|
# needs: [lint, test]
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [14.x]
|
|
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Add SSH deploy key
|
|
uses: shimataro/ssh-key-action@v2
|
|
with:
|
|
key: ${{ secrets.UNRAID_BOT_SSH_KEY }}
|
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
|
|
- name: Installing node deps
|
|
run: npm install
|
|
|
|
- name: Run build
|
|
run: npm run build
|
|
|
|
# See https://github.com/apollographql/subscriptions-transport-ws/issues/433
|
|
- name: Patch subscriptions-transport-ws
|
|
run: npm run patch:subscriptions-transport-ws
|
|
|
|
- name: Pack release
|
|
run: npm pack
|
|
|
|
- name: Release to Github and s3
|
|
uses: unraid/release-action@master
|
|
env:
|
|
GITHUB_USER: "unraid"
|
|
GITHUB_TOKEN: ${{ secrets.HUB_TOKEN }}
|
|
REPO: ${{ github.repository }}
|
|
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
# AWS_ACCESS_KEY_SECRET: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
|
|
# AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
|