Skip to content
package

GitHub Action

Composer package action

0.1.5 Latest version

Composer package action

package

Composer package action

With this GitHub Action, you can build a package for the PHP Composer package manager

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Composer package action

uses: rosven9856/composer-package-action@0.1.5

Learn more about this action in rosven9856/composer-package-action

Choose a version

github gitea actions

Building a composer package in GitHub Action

License GitHub Actions Workflow Status

With this GitHub Action, you can build a package for the PHP Composer package manager.

Example usage

    steps:
      - uses: actions/checkout@v4
      - uses: rosven9856/composer-package-action@0.1.5
        id: composer_package
        with:
          directory: ''
          file: ''
      - run: echo ${{ steps.composer_package.outputs.file_path }}
      - run: echo ${{ steps.composer_package.outputs.directory_path }}

Inputs

directory

The name of the directory for package building
Default value: .build

file

The name of the built package file
Default value: package.zip

Outputs

directory_path

The path to the building directory

file_path

The path to the compiled package archive

Developing

build

docker build . --build-arg=PHP_VERSION=8.3 -t=composer-package-action

initialization

docker run --rm -v .:/usr/bin/app composer-package-action composer install

running

docker run --rm -v .:/usr/bin/app composer-package-action php app.php

testing

docker run --rm -v .:/usr/bin/app composer-package-action composer tests