Skip to content

test background

test background #4

Workflow file for this run

name: Release Workflow
on:
push:
tags:
- 'v*.*.*'
jobs:
create-release:
name: Build and Create Tagged Release
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout source code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
cache-dependency-path: web/package-lock.json
- name: Install dependencies
run: |
if [ -d "web" ]; then
npm i
working-directory: web
fi
- name: Install dependencies and run build
if: ${{ env.WEB }}
run: |
npm install
npm run build
working-directory: ./web
env:
CI: false
- name: Create exclude file from input
run: |
echo "node_modules" >> exclude.txt
echo ".git" >> exclude.txt
echo ".github" >> exclude.txt
echo "exclude.txt" >> exclude.txt
echo "temp/" >> exclude.txt
- name: Bundle files
run: |
mkdir -p ./temp/release
rsync -av --progress --exclude-from=exclude.txt ./ ./temp/release/
if [ -d "web/dist" ]; then
mkdir -p ./temp/release/web
cp -r ./web/dist ./temp/release/web/dist
fi
cd ./temp && zip -r ../release.zip ./release
- name: Create Release
uses: 'marvinpinto/[email protected]'
with:
repo_token: '${{ secrets.GITHUB_TOKEN }}'
automatic_release_tag: ${{ github.ref_name }}
prerelease: false
files: release.zip