This repository has been archived on 2025-11-04. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
know-it-all/.github/workflows/build-assets.yml
2022-04-03 12:34:41 -05:00

38 lines
1.4 KiB
YAML

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Build release assets
on:
release:
types: [published]
jobs:
draft:
environment: production
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Write .env to build
env:
DOTENV: '${{ secrets.DOTENV }}'
run: echo "$DOTENV" >> .env
- name: Create public assets
run: mkdir ./server/public ./server/public/audio ./server/public/images
- name: Use Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Install dependencies and build
run: npm run dist
- name: Upload release assets
id: upload-release-asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: ./dist.tar.gz
asset_name: $tag-dist.tar.gz
asset_content_type: application/gzip
overwrite: true