From 2bdb967bfddaec10622302076f9d543e5bbc75fe Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Wed, 6 Nov 2024 17:55:20 +0200 Subject: [PATCH] * added `Build Release` workflow --- .github/workflows/build-release.yml | 68 +++++++++++++++++++++++++++++ .github/workflows/translations.yml | 20 --------- 2 files changed, 68 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/build-release.yml delete mode 100644 .github/workflows/translations.yml diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 00000000..ab6245a4 --- /dev/null +++ b/.github/workflows/build-release.yml @@ -0,0 +1,68 @@ +name: Build Release + +on: + push: + branches: + - master + +permissions: + contents: write + +jobs: + generate-translations: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: WordPress .pot File Generator + uses: iamdharmesh/action-wordpress-pot-generator@main + with: + destination_path: './languages' + slug: 'ultimate-member' + text_domain: 'ultimate-member' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + build: + needs: generate-translations + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install PHP + uses: "shivammathur/setup-php@v2" + with: + php-version: "latest" + - name: Install Composer Dependencies + run: | + composer install --no-progress --no-dev --optimize-autoloader --ignore-platform-req=ext-exif --ignore-platform-req=ext-gd --ignore-platform-req=ext-tidy + - name: Commit files + run: | + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git rm .bowerrc + git rm .editorconfig + git rm .gitignore + git rm .jshintrc + git rm .travis.yml + git rm bower.json + git rm composer.json + git rm gulpfile.js + git rm hookdoc-conf.json + git rm manifest.json + git rm package.json + git rm package-lock.json + git rm phpcs.xml + git rm phpdoc.dist.xml + git rm webpack.mix.js + git rm -r .github + git rm -r docs + git rm -r blocks-src + git rm -r tests + git add vendor/\* + git add includes/lib/action-scheduler/\* + git commit -a -m "Composer Installed. Cleared release repo." + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: releases + repository: ultimatemember/ultimatemember + force: true diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml deleted file mode 100644 index 0505af0a..00000000 --- a/.github/workflows/translations.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Generate POT file - -on: - push: - branches: - - master - -jobs: - WP_Generate_POT_File: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: WordPress .pot File Generator - uses: iamdharmesh/action-wordpress-pot-generator@main - with: - destination_path: './languages' - slug: 'ultimate-member' - text_domain: 'ultimate-member' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}