Files
api/.github/workflows/production.yml
T
Alexis Tyler c4e1df20e2 try github actions types filter
Signed-off-by: Alexis Tyler <xo@wvvw.me>
2019-09-06 14:26:39 +09:30

46 lines
1.2 KiB
YAML

name: Production
on:
release:
types: [created]
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.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
run: |
mkdir ~/.ssh/
# Add keys
echo "${{ secrets.GITHUB_READONLY_DEPLOY_KEY }}" > ~/.ssh/id_rsa
echo "${{ secrets.GITHUB_READONLY_DEPLOY_KEY_PUB }}" > ~/.ssh/id_rsa.pub
# Verifiy keys
ssh-keygen -l -f ~/.ssh/id_rsa.pub
# Add github.com to known hosts
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
# Set correct permissions
chmod 600 ~/.ssh/id_rsa
- name: Installing node deps
run: npm install
- name: Remove unneeded files
run: npm run build
- name: Packing release
run: npm pack
- name: Uploading release to Github
uses: OmgImAlexis/upload-to-release@master
with:
args: unraid-graphql-api-*.tgz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}