diff --git a/README.md b/README.md index 67194e7..177342c 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ 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/ @@ -15,7 +15,7 @@ An action for GitHub to upload your REDAXO AddOn automatically into the REDAXO i ## 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)). @@ -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. @@ -54,17 +54,25 @@ jobs: redaxo_publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - 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 }} - + - 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. @@ -73,7 +81,7 @@ 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. @@ -81,19 +89,19 @@ One line about the main new feature. ## 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.