From 1039e6a2cb8f95cca1fa2d09ca0457bfc08e22a1 Mon Sep 17 00:00:00 2001 From: Geoff Taylor Date: Tue, 4 Aug 2020 20:16:42 -0400 Subject: [PATCH] Github workflows updated --- .github/workflows/build-release.yml | 38 +++++++++++++++------ .github/workflows/continous-integration.yml | 9 ++++- .github/workflows/lint-code.yml | 2 +- 3 files changed, 36 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 45bd1e18..a4b29d98 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -1,13 +1,14 @@ name: build_release on: - release: - types: [published] + push: + tags: + - "v*" jobs: - run: - runs-on: ubuntu-latest + build_release: name: "Build Release" + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v1 @@ -22,12 +23,27 @@ jobs: - name: Install dependencies run: composer install --no-dev - - name: Remove unneeded files - run: | - rm -rf composer.json composer.lock tests \ - coveralls.yml netlify.toml docker docs vendor \ - bin .github .env.dist phpcs.xml .dockerignore \ - codeception.dist.yml .editorconfig .gitignore .git - - name: List files run: ls -laR + + - name: Generate draft release + uses: meeDamian/github-release@2.0 + with: + token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: true + draft: true + title: "Release {{ github.ref }}" + gzip: true + files: > + includes/ + vendor/ + .distignore + access-functions.php + CHANGELOG.md + class-inflect.php + LICENSE + logo.svg + README.md + README.txt + SECURITY.md + wp-graphql-woocommerce.php diff --git a/.github/workflows/continous-integration.yml b/.github/workflows/continous-integration.yml index 03ddfbbf..8bedcbe2 100644 --- a/.github/workflows/continous-integration.yml +++ b/.github/workflows/continous-integration.yml @@ -17,7 +17,7 @@ on: - '!docs/**' jobs: - run: + continuous_integration: env: STRIPE_API_PUBLISHABLE_KEY: ${{ secrets.STRIPE_API_PUBLISHABLE_KEY }} STRIPE_API_SECRET_KEY: ${{ secrets.STRIPE_API_SECRET_KEY }} @@ -49,6 +49,13 @@ jobs: php-version: ${{ matrix.php }} extensions: json, mbstring + - name: Get Composer Cache Directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Install dependencies + run: composer install --no-dev + - name: Build "testing" Docker Image env: PHP_VERSION: ${{ matrix.php }} diff --git a/.github/workflows/lint-code.yml b/.github/workflows/lint-code.yml index f6c1fa46..6ecf5148 100644 --- a/.github/workflows/lint-code.yml +++ b/.github/workflows/lint-code.yml @@ -15,7 +15,7 @@ on: - '!docs/**' jobs: - run: + lint_code: runs-on: ubuntu-latest name: "Lint code with PHPCS" steps: