Skip to content

Commit

Permalink
run composer without dev dependencies if composer.json is available
Browse files Browse the repository at this point in the history
  • Loading branch information
marcohanke committed Sep 23, 2023
1 parent c735e16 commit 518d1d0
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ An action for GitHub to upload your REDAXO AddOn automatically into the REDAXO i

## Preconditions

> **Please note:** The AddOn must already be created in MyREDAXO.
> **Please note:** The AddOn must already be created in MyREDAXO.
* A valid MyREDAXO user. Create a new login: https://redaxo.org/registrierung/
* A valid MyREDAXO user. Create a new login: https://redaxo.org/registrierung/
* A valid API key from https://redaxo.org/myredaxo/mein-api-key/
* Your AddOn created in MyAddons https://redaxo.org/myredaxo/meine-addons/

> **Notice** You don't need to be part of FriendsOfREDAXO to use this action. Just follow the instructions for evers repository.
## 1: Adding Secrets

> This step is not required for REDAXO AddOns within the FriendsOfREDAXO GitHub organization. Continue with step 2.
> This step is not required for REDAXO AddOns within the FriendsOfREDAXO GitHub organization. Continue with step 2.
Add your MyREDAXO credentials to your organization secrets or repository secrets, e.g. via `https://github.com/YOUR_GITHUB_NAME/YOUR_REPOSITORY/settings/secrets/actions` ([GitHub Docs](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository)).

Expand All @@ -31,7 +31,7 @@ example value for `MYREDAXO_API_KEY` named secret:

![API-Key](https://user-images.githubusercontent.com/16903055/170967258-f53082cd-e827-4a86-bed6-1233f34dd4b9.png)

## 2: Create a new GitHub action workflow
## 2: Create a new GitHub action workflow

Create a new release workflow by creating a new file in your repository called `.github/workflows/publish-to-redaxo-org.yml` with the following content or follow the instructions on https://github.com/YOUR_GITHUB_NAME/YOUR_REPOSITORY/actions/new.

Expand All @@ -54,17 +54,25 @@ jobs:
redaxo_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: FriendsOfREDAXO/installer-action@v1
- uses: actions/checkout@v3
if: hashFiles('composer.json') != ''
- uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
if: hashFiles('composer.json') != ''
- uses: ramsey/composer-install@v2
with:
composer-options: "--no-dev"
- uses: FriendsOfREDAXO/installer-action@v1
with:
myredaxo-username: ${{ secrets.MYREDAXO_USERNAME }}
myredaxo-api-key: ${{ secrets.MYREDAXO_API_KEY }}
description: ${{ github.event.release.body }}
version: ${{ github.event.release.tag_name }}

```

## 3. Create a new release with a nice description
## 3. Create a new release with a nice description

As soon as you publish a new release on GitHub, this workflow is triggered and your AddOn is uploaded to myREDAXO.

Expand All @@ -73,27 +81,27 @@ We recommend to create a new tag with the same name of the version defined in th
We also recommend to use a nice description with information about the date of the relase, new features or instructions for other developers, e.g. any important changes or tasks to do before or after the installation. It's possible to use markdown syntax.

```markdown
# My Addon Name | Published on XX.XX.202X | Version
# My Addon Name | Published on XX.XX.202X | Version

One line about the main new feature.

> **Important:** An warning about breaking changes, new preconditions or additional instructions

## What's new

* A list of features or changes with reference to contributing GitHub users , e.g. @friendsofredaxo
* A list of features or changes with reference to contributing GitHub users , e.g. @friendsofredaxo
* A list of features or changes with reference to contributing GitHub users , e.g. @friendsofredaxo
* A list of features or changes with reference to contributing GitHub users , e.g. @friendsofredaxo
* A list of features or changes with reference to contributing GitHub users , e.g. @friendsofredaxo
* A list of features or changes with reference to contributing GitHub users , e.g. @friendsofredaxo

## Changes

* A list of features or changes with reference to contributing GitHub users , e.g. @friendsofredaxo
* A list of features or changes with reference to contributing GitHub users , e.g. @friendsofredaxo
* A list of features or changes with reference to contributing GitHub users , e.g. @friendsofredaxo
* A list of features or changes with reference to contributing GitHub users , e.g. @friendsofredaxo

Changelog: https://www.example.org/
```

## 4. Watch and enjoy the smooth action workflow
## 4. Watch and enjoy the smooth action workflow

You can monitor the status of the workflow under https://github.com/YOUR_GITHUB_NAME/YOUR_REPOSITORY/actions. Once completed, the result is your REDAXO AddOn published through MyREDAXO and live in ever REDAXO 5 installer.

Expand Down

0 comments on commit 518d1d0

Please sign in to comment.