-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (45 loc) · 1.41 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Build UI and Release
on:
workflow_dispatch:
inputs:
tag_name:
description: 'Tag name for the release'
required: true
type: string
release_name:
description: 'Release name'
required: false
type: string
default: 'Release'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install archive tools
run: sudo apt-get install -y zip
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '22.6.0'
- name: Install dependencies
run: npm install --prefix web
- name: Build UI
run: npm run build --prefix web
- name: Clean up unnecessary files
run: |
find web/ -mindepth 1 -maxdepth 1 ! -name 'build' -exec rm -rf {} +
- name: Create a zip archive
run: |
zip -r p-clothing.zip . -x "*.git/*" -x ".github/*"
- name: Create a release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.tag_name || github.ref_name }}
release_name: ${{ github.event.inputs.release_name || 'Release' }} ${{ github.event.inputs.tag_name || github.ref_name }}
draft: false
prerelease: false
files: p-clothing.zip