|
1 | | -name: Store |
| 1 | +name: Build extension |
2 | 2 | on: |
3 | | - pull_request: |
4 | 3 | push: |
5 | 4 | branches: |
6 | | - - 'main' |
7 | | - - 'without-docker' |
8 | | - tags: |
9 | | - - '*' |
10 | | - |
11 | | -env: |
12 | | - PLUGIN_NAME: ${{ github.event.repository.name }} |
13 | | - SHOPWARE_CLI_ACCOUNT_EMAIL: ${{ secrets.ACCOUNT_USER }} |
14 | | - SHOPWARE_CLI_ACCOUNT_PASSWORD: ${{ secrets.ACCOUNT_PASSWORD }} |
| 5 | + - main |
15 | 6 |
|
16 | 7 | jobs: |
17 | | - validatePlugin: |
18 | | - if: startsWith(github.ref, 'refs/tags/') != true |
19 | | - name: Check for Store compliance |
20 | | - runs-on: ubuntu-latest |
21 | | - steps: |
22 | | - - name: Download shopware-cli |
23 | | - run: | |
24 | | - wget -q https://github.com/FriendsOfShopware/shopware-cli/releases/download/0.1.37/shopware-cli_0.1.37_Linux_x86_64.tar.gz |
25 | | - tar -zxf shopware-cli_*.tar.gz shopware-cli |
26 | | - sudo mv shopware-cli /usr/bin/shopware-cli |
27 | | - rm shopware-cli_*.tar.gz |
28 | | -
|
29 | | - - name: Checkout |
30 | | - uses: actions/checkout@v2.3.1 |
31 | | - with: |
32 | | - path: ${{ env.PLUGIN_NAME }} |
33 | | - |
34 | | - - name: Build & create zip |
35 | | - run: shopware-cli extension zip --disable-git ${{ env.PLUGIN_NAME }} |
36 | | - |
37 | | - - name: Validate Zip |
38 | | - run: shopware-cli extension validate ${{ env.PLUGIN_NAME }}.zip |
39 | | - |
40 | | - StoreUpdate: |
41 | | - needs: validatePlugin |
42 | | - name: Update Store page |
43 | | - if: startsWith(github.ref, 'refs/tags/') || contains(github.event.head_commit.message, '[store update]') |
44 | | - runs-on: ubuntu-latest |
45 | | - steps: |
46 | | - - name: Download shopware-cli |
47 | | - run: | |
48 | | - wget -q https://github.com/FriendsOfShopware/shopware-cli/releases/download/0.1.37/shopware-cli_0.1.37_Linux_x86_64.tar.gz |
49 | | - tar -zxf shopware-cli_*.tar.gz shopware-cli |
50 | | - sudo mv shopware-cli /usr/bin/shopware-cli |
51 | | - rm shopware-cli_*.tar.gz |
52 | | -
|
53 | | - - name: Checkout |
54 | | - uses: actions/checkout@v2.3.1 |
55 | | - with: |
56 | | - path: ${{ env.PLUGIN_NAME }} |
57 | | - |
58 | | - - name: StoreUpdate |
59 | | - run: shopware-cli account producer extension info push $(pwd)/${{ env.PLUGIN_NAME }}/ |
60 | | - |
61 | | - StoreRelease: |
62 | | - if: startsWith(github.ref, 'refs/tags/') |
63 | | - runs-on: ubuntu-latest |
64 | | - name: Upload Extension to Store |
65 | | - steps: |
66 | | - - name: Download shopware-cli |
67 | | - run: | |
68 | | - wget -q https://github.com/FriendsOfShopware/shopware-cli/releases/download/0.1.37/shopware-cli_0.1.37_Linux_x86_64.tar.gz |
69 | | - tar -zxf shopware-cli_*.tar.gz shopware-cli |
70 | | - sudo mv shopware-cli /usr/bin/shopware-cli |
71 | | - rm shopware-cli_*.tar.gz |
72 | | - |
73 | | - - name: Checkout |
74 | | - uses: actions/checkout@v2.3.1 |
75 | | - with: |
76 | | - path: ${{ env.PLUGIN_NAME }} |
77 | | - |
78 | | - - name: Build & create zip |
79 | | - run: | |
80 | | - shopware-cli extension zip --disable-git ${{ env.PLUGIN_NAME }} |
81 | | -
|
82 | | - - name: StoreUpload |
83 | | - run: shopware-cli account producer extension upload $(pwd)/${PLUGIN_NAME}*.zip |
84 | | - env: |
85 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 8 | + build: |
| 9 | + uses: FriendsOfShopware/actions/.github/workflows/store-shopware-cli.yml@main |
| 10 | + with: |
| 11 | + extensionName: ${{ github.event.repository.name }} |
| 12 | + secrets: |
| 13 | + accountUser: ${{ secrets.ACCOUNT_USER }} |
| 14 | + accountPassword: ${{ secrets.ACCOUNT_PASSWORD }} |
| 15 | + ghToken: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments