Release 1.5.8 #12
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: Clean up unnecessary files | |
run: | | |
rm -rf node_modules tests CODE_OF_CONDUCT.md CONTRIBUTING.md flake.lock flake.nix phpunit.xml shell.nix | |
echo "Unnecessary files removed." | |
- name: Create release directory | |
run: mkdir -p release/kokofixcomputers | |
- name: Package the build into a tar file | |
run: | | |
TAR_FILE="release/kokofixcomputers/panel.tar.gz" # Set the desired filename here | |
tar -czf "$TAR_FILE" . # The dot (.) indicates to include everything in the current directory | |
echo "Release created at $TAR_FILE" | |
- name: Upload release artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: release-artifact | |
path: release/kokofixcomputers/panel.tar.gz | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: v1.0.0 # Change this to your desired version/tag | |
name: "Release v1.1.0" # Change this to your desired release name | |
files: release/kokofixcomputers/panel.tar.gz # Specify the file to attach | |
draft: false # Set to true if you want to create a draft release | |
prerelease: false # Set to true if this is a pre-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Automatically provided by GitHub Actions |