Skip to content

Build your Liferay workspace (Gradle or Maven) & upload the bundle and artifacts in the workflow to be used later (e.g. for a release).

License

Notifications You must be signed in to change notification settings

lgdd/liferay-build-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Liferay Build Action

lgdd/liferay-build-action@v1 build your Liferay workspace (Gradle or Maven) and can upload the bundle and artifacts in the workflow to be used later (e.g. for a release).

Usage

You can use this action in a GitHub Actions Workflow by a adding a YAML file under .github/workflows/ with the following content:

Examples

Build on push & pull request

name: liferay-workspace-build
run-name: Liferay Workspace Build

on:
  push:
  pull_request:

jobs:
  liferay-build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: lgdd/liferay-build-action@v1
        with:
          profile: 'prod'
          upload-bundle: false
          upload-artifacts: false

Release with bundle only

name: liferay-workspace-release
run-name: Liferay Workspace Release

on:
  push:
    tags:
      - 'v*'

jobs:
  liferay-build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: lgdd/liferay-build-action@v1
        with:
          profile: 'prod'
          upload-bundle: true
          upload-artifacts: false
      - uses: actions/download-artifact@v3
        with:
          name: bundle
      - name: Create Release
        if: success()
        env:
          GH_TOKEN: ${{ github.token }}
        run: |
          ./gradlew deploy
          gh release create ${{ github.ref }} $(ls *.zip) --generate-notes

Release with artifacts only

name: liferay-workspace-release
run-name: Liferay Workspace Release

on:
  push:
    tags:
      - 'v*'

jobs:
  liferay-build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: lgdd/liferay-build-action@v1
        with:
          profile: 'prod'
          upload-bundle: false
          upload-artifacts: true
      - uses: actions/download-artifact@v3
        with:
          name: artifacts
      - name: Create Release
        if: success()
        env:
          GH_TOKEN: ${{ github.token }}
        run: |
          ./gradlew deploy
          gh release create ${{ github.ref }} $(ls *.jar && ls *.zip && ls *.war) --generate-notes

License

MIT

About

Build your Liferay workspace (Gradle or Maven) & upload the bundle and artifacts in the workflow to be used later (e.g. for a release).

Resources

License

Stars

Watchers

Forks