Release 1.5.8 #6
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: Build and Release | |
on: | |
workflow_dispatch: # Allows manual triggering of the workflow | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' # Change to your required Node.js version | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile # Use Yarn to install dependencies | |
- name: Build the project | |
run: yarn build:production # Adjust this command based on your build process | |
- name: Create release directory | |
run: mkdir -p release | |
- name: Package the build into a tar file | |
run: | | |
TAR_FILE="release/${{ github.repository }}-$(date +'%Y%m%d%H%M%S').tar.gz" | |
tar -czf "$TAR_FILE" -C dist . # Adjust 'dist' to your build output directory | |
echo "Release created at $TAR_FILE" | |
- name: Upload release artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: release-artifact | |
path: release/*.tar.gz |