diff --git a/.github/workflows/upload-schema-artifact.yml b/.github/workflows/upload-schema-artifact.yml index a0f801c..4f21d62 100644 --- a/.github/workflows/upload-schema-artifact.yml +++ b/.github/workflows/upload-schema-artifact.yml @@ -1,15 +1,8 @@ -name: Schema Artifact +name: Upload Schema Artifact on: - workflow_dispatch: - push: - branches: - - develop - - master - pull_request: - branches: - - develop - - master + release: + types: [ published ] jobs: run: @@ -51,14 +44,9 @@ jobs: cd /tmp/wordpress/ # Output: /tmp/schema.graphql wp graphql generate-static-schema - - name: Upload Schema Artifact - uses: actions/upload-artifact@v2 + - name: Upload schema as release artifact + uses: softprops/action-gh-release@v1 with: - name: dist-without-markdown - path: /tmp/schema.graphql -# - name: Upload schema as release artifact -# uses: softprops/action-gh-release@v1 -# with: -# files: /tmp/schema.graphql -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + files: /tmp/schema.graphql + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/bin/install-test-env.sh b/bin/install-test-env.sh index b50f674..009a1c0 100644 --- a/bin/install-test-env.sh +++ b/bin/install-test-env.sh @@ -9,8 +9,6 @@ fi source .env -env | sort - print_usage_instruction() { echo "Ensure that .env file exist in project root directory exists." echo "And run the following 'composer build-test' in the project root directory" @@ -141,8 +139,6 @@ install_db() { fi fi - env | sort - # create database RESULT=`mysql -u $DB_USER --password="$DB_PASS" --skip-column-names -e "SHOW DATABASES LIKE '$DB_NAME'"$EXTRA` if [ "$RESULT" != $DB_NAME ]; then