Skip to content

full server base implemented #5

full server base implemented

full server base implemented #5

name: React.js Build and Release
on:
push:
tags:
- 'app-v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install dependencies and build
run: |
cd ${{ github.workspace }}/app
npm install
npm run build
- name: Compress Folder
run: |
cd ${{ github.workspace }}/app/dist
zip -r app.zip .
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: true
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/app/dist/app.zip
asset_name: app.zip
asset_content_type: application/zip