Create Release #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |