From 585f6cedfb64c9b240911b353dcc63d9541288d3 Mon Sep 17 00:00:00 2001 From: Tiago Noronha Date: Wed, 7 Feb 2024 17:13:17 +0000 Subject: [PATCH] Add build and release workflow --- .github/workflows/build-release.yaml | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/build-release.yaml diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml new file mode 100644 index 0000000..9a2e45f --- /dev/null +++ b/.github/workflows/build-release.yaml @@ -0,0 +1,29 @@ +name: Build and Release + +on: + release: + types: [ released ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Validate composer.json and composer.lock + run: composer validate --strict + + - name: Install dependencies + run: | + composer run-script packages-install -- --no-dev + npm ci + npm run build + + - name: Zip Folder + run: zip -r ${{ github.event.repository.name }}.zip . -x ".git/*" ".github/*" "node_modules/*" ".gitignore" ".editorconfig" ".phpcs.xml" "composer.json" "composer.lock" "package.json" "package-lock.json" + + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: ${{ github.event.repository.name }}.zip