Skip to content

testing workflow

testing workflow #16

Workflow file for this run

name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: build1
path: dist
retention-days: 1
prepare-template:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: build1
path: dist
- name: Get Template
run: |
cd dist
git clone https://github.com/Thre4dripper/NodeTs-Express-Service-Based-Template.git template
cd template
rm -rf .git && rm -rf .github
cd ../
cp -r template template-ts && cp -r template template-js
cd template-ts && rm -rf src-javascript && mv src-typescript src
cd ../
cd template-js && rm -rf src-typescript && mv src-javascript src
cd ../
rm -rf template
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: build2
path: dist
retention-days: 1
publish:
needs: prepare-template
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: build2
path: dist
- name: Publish package on NPM
run: echo "publishing package on NPM"
- name: List files and folders
run: ls -R