This reusable GitHub Actions workflow automates the process of creating releases for web applications, including build generation, artifact creation, and release publishing with optional email notifications.
The workflow performs these main tasks:
- Checks prerequisites and existing releases
- Sets up the development environment (Node.js, Wrappid toolkit)
- Builds the web application
- Creates a GitHub release with build artifacts
- Sends email notifications (optional)
Create a workflow file (e.g., .github/workflows/create-release.yml) in your repository:
name: Create Web Release
on:
workflow_dispatch:
inputs:
tag-name:
description: 'Tag name for release (optional)'
required: false
jobs:
create-release:
uses: wrappid/workflows/.github/workflows/create-app-web-release.yml@main
with:
GIT_USER_NAME: "Your Name"
TOOLKIT_VERSION: "1.0.0"
EMAIL_NOTIFY: "true"
EMAIL_SENDER_NAME: "CI/CD Pipeline"
secrets:
PAT: ${{ secrets.PAT }}
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
WRAPPID_REGISTRY_TOKEN: ${{ secrets.WRAPPID_REGISTRY_TOKEN }}
EMAIL_SERVER_ADDRESS: ${{ secrets.EMAIL_SERVER_ADDRESS }}
EMAIL_SERVER_PORT: ${{ secrets.EMAIL_SERVER_PORT }}
EMAIL_USER_ID: ${{ secrets.EMAIL_USER_ID }}
EMAIL_USER_PASSWORD: ${{ secrets.EMAIL_USER_PASSWORD }}
EMAIL_TO: ${{ secrets.EMAIL_TO }}
EMAIL_CC: ${{ secrets.EMAIL_CC }}
EMAIL_BCC: ${{ secrets.EMAIL_BCC }}| Name | Required | Default | Description |
|---|---|---|---|
GIT_USER_NAME |
Yes | - | The name to use for Git operations |
TOOLKIT_VERSION |
Yes | - | Version of @wrappid/toolkit to use |
EMAIL_NOTIFY |
Yes | "true" | Enable/disable email notifications |
EMAIL_SENDER_NAME |
No | - | Name to use as email sender |
PAT: GitHub Personal Access TokenGIT_USER_EMAIL: Email for Git operationsWRAPPID_REGISTRY_TOKEN: Token for Wrappid npm registry access
EMAIL_SERVER_ADDRESS: SMTP server addressEMAIL_SERVER_PORT: SMTP server portEMAIL_USER_ID: SMTP user IDEMAIL_USER_PASSWORD: SMTP user passwordEMAIL_TO: Recipient email address(es)
EMAIL_CC: CC email address(es)EMAIL_BCC: BCC email address(es)
- Verifies if a tag exists
- Checks if a release already exists
- Outputs:
tag-version: Version tag to userelease-exist: Whether release exists
- Runs only if release doesn't exist
- Sets up development environment
- Builds web application
- Creates release with artifacts:
- Web build (ZIP)
- Wrappid logs
- Generates and attaches release notes
The workflow creates and uploads these artifacts:
web-v{version}.zip: Web application buildwrappid-logs-v{version}.log: Build process logsRELEASE_NOTES.md: Auto-generated release notes
- Node.js project with package.json
- GitHub repository with proper permissions
- Wrappid toolkit compatibility
- Required secrets configured
- SMTP server access (if email notifications enabled)
- Runs on: Ubuntu latest
- Node.js version: 16
- Required permissions: write-all
- Separate build and artifact creation into different jobs
- Implement parallel build jobs
- Add options to skip particular builds
- Re-enable Android build support (currently commented out)
- The workflow automatically falls back to the latest tag if no tag name is provided
- Release creation is skipped if a release already exists for the tag
- Wrappid toolkit is installed globally for build operations
- Web builds are created with staging environment configuration
- Android build support is currently disabled but can be uncommented if needed
- Ensure all required secrets are properly configured
- Verify Wrappid toolkit version compatibility
- Check if the repository has sufficient permissions
- Review wrappid-logs for build-related issues