Skip to content

Add GitHub Actions workflows for CI/CD #1

Add GitHub Actions workflows for CI/CD

Add GitHub Actions workflows for CI/CD #1

Workflow file for this run

name: Build and Release
on:
push:
branches:
- main
- 'copilot/**'
tags:
- 'v*'
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build Lovable App
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build application
run: npm run build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: lovable-mac-app
path: |
dist/*.app
dist/*.dmg
dist/*.zip
retention-days: 7
if-no-files-found: warn
release:
name: Create Release
runs-on: macos-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build and publish
run: npm run build-dmg
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
dist/*.dmg
dist/*.zip
draft: false
prerelease: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}