-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (43 loc) · 1.34 KB
/
create_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
name: Create Release
on:
workflow_dispatch:
inputs:
folder_name_1:
description: 'Specify the first folder name'
required: true
folder_name_2:
description: 'Specify the second folder name'
required: true
tag:
description: 'Specify the tag for the release'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '14'
- name: Install dependencies
run: npm install
- name: Create archive for folder 1
run: |
folder_name="${{ github.event.inputs.folder_name_1 }}"
zip -r "$folder_name.zip" -j "$folder_name/*"
- name: Create archive for folder 2
run: |
folder_name="${{ github.event.inputs.folder_name_2 }}"
zip -r "$folder_name.zip" -j "$folder_name/*"
- name: Upload to releases
uses: softprops/action-gh-release@v1
with:
files: |
${{ github.workspace }}/${{ github.event.inputs.folder_name_1 }}.zip
${{ github.workspace }}/${{ github.event.inputs.folder_name_2 }}.zip
name: Release ${{ github.event.inputs.tag }}
tag_name: ${{ github.event.inputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}