Skip to content

Commit

Permalink
refactor: unify the process of create the openedx-commerce directory …
Browse files Browse the repository at this point in the history
…for the release
  • Loading branch information
MaferMazu committed Sep 5, 2024
1 parent 7de2a84 commit 89ef617
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/upload-release-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@ jobs:
with:
composer-options: "--no-dev"

- name: Prepare the openedx-commerce directory for the release
run: |
make release
- name: Archive Release
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: 'openedx-commerce.zip'
exclusions: '*.git* .* /test/* /requirements/* /docs/* composer.lock *.yaml *.xml Makefile'
path: './openedx-commerce'

- name: Upload zip to latest release
uses: xresloader/upload-to-github-release@v1
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/wordpress-plugin-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ jobs:
with:
composer-options: "--no-dev"

# Prepare the plugin as we prepare it in the ZIP creation
- name: Create openedx-commerce directory and copy files
- name: Prepare the openedx-commerce directory for the release
run: |
mkdir openedx-commerce
rsync -av --exclude='*.git*' --exclude='.*' --exclude='/test/*' --exclude='/requirements/*' --exclude='/docs/*' --exclude='composer.lock' --exclude='*.yaml' --exclude='*.xml' --exclude='Makefile' ./ openedx-commerce/
make release
- name: Run plugin check
uses: wordpress/plugin-check-action@v1
Expand Down
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ requirements:
serve_docs: ## serve the built docs locally to preview the site in the browser
sphinx-autobuild docs/source $(BUILDDIR)/html

# Create the openedx-commerce directory with the needed files for the release.
release:
mkdir openedx-commerce
rsync -av --exclude='*.git*' --exclude='.*' --exclude='/test/*' \
--exclude='/requirements/*' --exclude='/docs/*' --exclude='composer.lock' \
--exclude='*.yaml' --exclude='*.xml' --exclude='Makefile' ./ openedx-commerce/

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
Expand Down

0 comments on commit 89ef617

Please sign in to comment.