Skip to content

Commit ec44c6b

Browse files
committed
add github release workflow and restructure readme
1 parent 78398c6 commit ec44c6b

5 files changed

Lines changed: 95 additions & 10 deletions

File tree

.github/workflows/package.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Package
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [master, main]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Create Plugin ZIP
16+
run: ./create_plugin_zip.sh
17+
18+
- uses: actions/upload-artifact@v4
19+
with:
20+
path: codebarista_revocationbutton_*.zip
21+
if-no-files-found: error

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
tags:
9+
- 'v*'
10+
11+
jobs:
12+
build:
13+
name: Publish Plugin ZIP
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Create Plugin ZIP
20+
run: ./create_plugin_zip.sh
21+
22+
- name: Upload Plugin ZIP to release
23+
uses: svenstaro/upload-release-action@v2
24+
with:
25+
repo_token: ${{ secrets.GITHUB_TOKEN }}
26+
file: codebarista_revocationbutton_*.zip
27+
file_glob: true
28+
tag: ${{ github.ref }}
29+
overwrite: true

README.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# Revocation Button for Shopware 6.4 / 6.5
22

3-
A Shopware plugin that adds the legally mandated revocation button to the storefont.
4-
This basically backports the native Shopware 6.6/6.7 implementation to Shopware 6.4/6.5.
3+
A Shopware plugin that adds the legally mandated revocation button to the storefront,
4+
similar to the native Shopware 6.6/6.7 implementation.
5+
6+
## Compatibility
7+
8+
- PHP 7.4+ / 8.x
9+
- Shopware `~6.4.12 || ~6.5.0`
510

611
## What it does
712

@@ -12,7 +17,19 @@ This basically backports the native Shopware 6.6/6.7 implementation to Shopware
1217
- `codebarista_revocation_request.customer` — confirmation to the customer.
1318
Both can be customised under *Settings → Email templates*.
1419

15-
## Adding the revocation link to the storefront
20+
## How to use it
21+
22+
> [!IMPORTANT]
23+
> Always test new plugin versions in a dev environment before using them in a production/live shop.
24+
25+
1. Download the ZIP archive from the latest [release](https://github.com/codebarista-de/revocationbutton/releases).
26+
2. Log in to the Admin UI of your shop and go to `Extensions > My extensions`.
27+
3. Click `Upload extension` and select the downloaded ZIP archive.
28+
4. Find the `Revocation Button` extension in the list.
29+
5. Install and activate it.
30+
31+
32+
### Adding the revocation link to the storefront
1633

1734
The plugin does not auto-inject the link, so you keep full control over
1835
placement, label and visibility. To add the link the same way imprint and
@@ -23,7 +40,7 @@ privacy are exposed:
2340
3. **Admin → Sales Channels → (your channel) → Service menu** — add the new category to the service-menu category tree.
2441
4. Save and clear caches. The link now appears in the footer service menu next to *Imprint* / *Privacy*.
2542

26-
## Configuration
43+
### Configuration
2744

2845
Configure under *Settings → Plugins → Revocation Button → Configure*.
2946
All fields are optional — sensible fallbacks apply when left empty.
@@ -35,11 +52,6 @@ All fields are optional — sensible fallbacks apply when left empty.
3552
| Outgoing mail – From: address | merchant inbox address | `From:` used for **both** outgoing mails (notification + customer confirmation). |
3653
| Outgoing mail – From: display name | sales channel name | `From:` display name used for **both** outgoing mails. |
3754

38-
## Compatibility
39-
40-
- PHP 7.4+ / 8.x
41-
- Shopware `~6.4.12 || ~6.5.0`
42-
4355
## License
4456

4557
MIT — see [LICENSE](LICENSE).

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "codebarista/revocationbutton",
33
"version": "1.0.0",
4-
"description": "Backports the Shopware 6.6/6.7 revocation request form to Shopware 6.4/6.5 so EU shops can comply with the legally mandated revocation button.",
4+
"description": "Revocation button for Shopware 6.4/6.5.",
55
"type": "shopware-platform-plugin",
66
"license": "MIT",
77
"keywords": ["shopware", "shopware-plugin", "revocation", "withdrawal", "widerruf", "eu", "compliance"],

create_plugin_zip.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
3+
set -e
4+
set -v
5+
6+
version=$(jq -r ".version" < composer.json)
7+
root_folder="RevocationButton"
8+
filename="codebarista_revocationbutton_$version.zip"
9+
out_file="$PWD/$filename"
10+
11+
rm -rf "/tmp/$root_folder"
12+
mkdir -p "/tmp/$root_folder"
13+
cp -r . "/tmp/$root_folder/"
14+
15+
rm -f "$out_file"
16+
17+
( cd /tmp && zip -r "$out_file" "$root_folder" \
18+
-x "$root_folder/.*" \
19+
-x "$root_folder/*.xcf" \
20+
-x "$root_folder/bin*" \
21+
-x "$root_folder/*.sh" \
22+
-x "$root_folder/*.zip" \
23+
-x "$root_folder/*.md")

0 commit comments

Comments
 (0)