From 17657338646d378e25abe086445fa0cc3f1869e8 Mon Sep 17 00:00:00 2001 From: Sibin Grasic Date: Thu, 9 Nov 2023 22:51:17 +0100 Subject: [PATCH] chore(build): Fixed release process --- .github/workflows/release.yml | 120 ++++++++++++++++++---------------- 1 file changed, 63 insertions(+), 57 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ad90a23..775e5b6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,57 +1,63 @@ -name: Build and release -on: - push: - branches: - - master - paths-ignore: - - '.wordpress-org/**' - - '.github/workflows/wp-deploy.yml' - - '.github/workflows/wp-assets.yml' - - '.github/scripts/deploy.sh' - - 'README.md' - - 'CHANGELOG.md' - - '.codeclimate.yml' - -jobs: - release: - name: Release - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: Setup Node.js - uses: actions/setup-node@v2.4.0 - with: - node-version: 16 - cache: yarn - - name: Cache Composer dependencies - uses: actions/cache@v2.1.6 - with: - path: /tmp/composer-cache - key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} - - name: Install composer dependencies - uses: php-actions/composer@v6 - with: - php_version: 7.4 - version: 2 - dev: no - quiet: yes - args: --optimize-autoloader --classmap-authoritative --prefer-dist - - name: Install Yarn dependencies - run: yarn install - - name: Lint - run: yarn lint - - name: Build - run: "yarn build:production" - - name: Release - env: - GIT_AUTHOR_NAME: "oblakbot" - GIT_AUTHOR_EMAIL: "sibin.grasic+bot@oblak.studio" - GIT_COMMITTER_NAME: "oblakbot" - GIT_COMMITTER_EMAIL: 'sibin.grasic+bot@oblak.studio' - GITHUB_TOKEN: ${{ secrets.OBLAK_BOT_TOKEN }} - run: yarn run semantic-release - - +name: Build and release +on: + push: + branches: + - master + paths-ignore: + - '.wordpress-org/**' + - '.github/workflows/wp-deploy.yml' + - '.github/workflows/wp-assets.yml' + - '.github/scripts/deploy.sh' + - 'README.md' + - 'CHANGELOG.md' + - '.codeclimate.yml' + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: Import GPG key + uses: crazy-max/ghaction-import-gpg@v5 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.GPG_PASSPHRASE }} + git_config_global: true + git_user_signingkey: true + git_commit_gpgsign: true + - name: Setup Node.js + uses: actions/setup-node@v2.4.0 + with: + node-version: 16 + cache: yarn + - name: Cache Composer dependencies + uses: actions/cache@v2.1.6 + with: + path: /tmp/composer-cache + key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} + - name: Install composer dependencies + uses: php-actions/composer@v6 + with: + php_version: 7.4 + version: 2 + dev: no + quiet: yes + args: --optimize-autoloader --classmap-authoritative --prefer-dist + - name: Install Yarn dependencies + run: yarn install + - name: Lint + run: yarn lint + - name: Build + run: 'yarn build:production' + - name: Release + env: + GIT_AUTHOR_NAME: 'oblakbot' + GIT_AUTHOR_EMAIL: 'sibin.grasic+bot@oblak.studio' + GIT_COMMITTER_NAME: 'oblakbot' + GIT_COMMITTER_EMAIL: 'sibin.grasic+bot@oblak.studio' + GITHUB_TOKEN: ${{ secrets.OBLAK_BOT_TOKEN }} + run: yarn run semantic-release