Created github workflows

This commit is contained in:
Ceferino Patino 2022-04-07 20:50:18 -05:00
commit 9492a4f260
4 changed files with 86 additions and 2 deletions

31
.github/release-drafter.yml vendored Normal file
View file

@ -0,0 +1,31 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: 'Features'
labels:
- 'feature'
- 'enhancement'
- title: 'Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: 'Maintenance'
label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&#@' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
# Changes
$CHANGES

33
.github/workflows/build-release.yml vendored Normal file
View file

@ -0,0 +1,33 @@
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: Use Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Install dependencies and build
run: npm run package
- name: Upload release assets
id: upload-release-asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: ./build.tar.gz
asset_name: $tag-dist.tar.gz
asset_content_type: application/gzip
overwrite: true

18
.github/workflows/draft-release.yml vendored Normal file
View file

@ -0,0 +1,18 @@
name: Create release draft
on:
push:
branches: [development]
workflow_dispatch:
jobs:
draft:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Draft release
uses: release-drafter/release-drafter@v5
id: release-draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -5,9 +5,11 @@
"main": "index.js",
"scripts": {
"start": "npm start -ws",
"build": "npm run build -ws"
"build": "npm run build -ws",
"prepackage": "npm ci && npm run build",
"package": "tar -czf ./build.tar.gz ./build"
},
"author": "",
"author": "C4 Patino",
"license": "ISC",
"workspaces": [
"client"