From 3443f65982b6b3aef894381ca0005c4cd6344f5d Mon Sep 17 00:00:00 2001 From: yeremi Date: Sun, 5 Jan 2025 03:21:39 +0100 Subject: [PATCH 1/3] chore: update release --- .github/workflows/release.yml | 37 ++++++++--------------------------- .releaserc.json | 21 -------------------- package-lock.json | 24 +++++++++++++++++++++++ package.json | 5 +++++ release.config.js | 31 +++++++++++++++++++++++++++++ 5 files changed, 68 insertions(+), 50 deletions(-) delete mode 100644 .releaserc.json create mode 100644 release.config.js diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2129acb..040a7c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,46 +1,25 @@ -name: Stopwords Release - +name: Release on: push: branches: - main - - master - - workflow_dispatch: - jobs: release: - name: Create Release + name: Release runs-on: ubuntu-latest - permissions: - contents: write - issues: write - pull-requests: write - steps: - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - persist-credentials: false + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 'lts/*' - - - name: Set up PHP - uses: shivammathur/setup-php@v2 + uses: actions/setup-node@v4 with: - php-version: '8.2' - extensions: mbstring, bcmath + node-version: 18 - - name: Install Dependencies - run: | - npm init -y - npm install --save-dev semantic-release @semantic-release/changelog @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/git @semantic-release/github + - name: Install dependencies + run: npm ci - - name: Create Release + - name: Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: npx semantic-release diff --git a/.releaserc.json b/.releaserc.json deleted file mode 100644 index f3c5714..0000000 --- a/.releaserc.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "branches": ["main", "master"], - "plugins": [ - "@semantic-release/commit-analyzer", - "@semantic-release/release-notes-generator", - [ - "@semantic-release/changelog", - { - "changelogFile": "CHANGELOG.md" - } - ], - [ - "@semantic-release/git", - { - "assets": ["CHANGELOG.md", "package.json", "package-lock.json"], - "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" - } - ], - "@semantic-release/github" - ] -} diff --git a/package-lock.json b/package-lock.json index af7bd0e..bc338d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,8 +10,12 @@ "license": "MIT", "devDependencies": { "@semantic-release/changelog": "^6.0.3", + "@semantic-release/commit-analyzer": "^13.0.1", + "@semantic-release/exec": "^6.0.3", "@semantic-release/git": "^10.0.1", "@semantic-release/github": "^11.0.1", + "@semantic-release/npm": "^12.0.1", + "@semantic-release/release-notes-generator": "^14.0.3", "semantic-release": "^24.2.0" } }, @@ -324,6 +328,26 @@ "node": ">=14.17" } }, + "node_modules/@semantic-release/exec": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@semantic-release/exec/-/exec-6.0.3.tgz", + "integrity": "sha512-bxAq8vLOw76aV89vxxICecEa8jfaWwYITw6X74zzlO0mc/Bgieqx9kBRz9z96pHectiTAtsCwsQcUyLYWnp3VQ==", + "dev": true, + "dependencies": { + "@semantic-release/error": "^3.0.0", + "aggregate-error": "^3.0.0", + "debug": "^4.0.0", + "execa": "^5.0.0", + "lodash": "^4.17.4", + "parse-json": "^5.0.0" + }, + "engines": { + "node": ">=14.17" + }, + "peerDependencies": { + "semantic-release": ">=18.0.0" + } + }, "node_modules/@semantic-release/git": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/@semantic-release/git/-/git-10.0.1.tgz", diff --git a/package.json b/package.json index 3441950..c16c18c 100644 --- a/package.json +++ b/package.json @@ -23,10 +23,15 @@ "natural language processing" ], "license": "MIT", + "private": true, "devDependencies": { "@semantic-release/changelog": "^6.0.3", + "@semantic-release/commit-analyzer": "^13.0.1", + "@semantic-release/exec": "^6.0.3", "@semantic-release/git": "^10.0.1", "@semantic-release/github": "^11.0.1", + "@semantic-release/npm": "^12.0.1", + "@semantic-release/release-notes-generator": "^14.0.3", "semantic-release": "^24.2.0" } } diff --git a/release.config.js b/release.config.js new file mode 100644 index 0000000..0f985b0 --- /dev/null +++ b/release.config.js @@ -0,0 +1,31 @@ +module.exports = { + "branches": [ + "main", + "next", + { + "name": "beta", + "prerelease": true + }, + { + "name": "alpha", + "prerelease": true + } + ], + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/changelog", + ["@semantic-release/npm", { + "tarballDir": "release", + "npmPublish": false + }], + "@semantic-release/exec", + "@semantic-release/github", + ["@semantic-release/git", { + "assets": ["CHANGELOG.md", "package-lock.json", "package.json", "composer.json"], + "message": "chore(release): \${nextRelease.version} [skip ci]\n\n\${nextRelease.notes}" + }] + ], + "preset": "angular", + "tagFormat": "${version}" +} \ No newline at end of file From d1f45af4393d757422d1269f136f17fec005ff1d Mon Sep 17 00:00:00 2001 From: yeremi Date: Sun, 5 Jan 2025 03:23:53 +0100 Subject: [PATCH 2/3] chore: update release --- .github/workflows/php-qa.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/php-qa.yml b/.github/workflows/php-qa.yml index ed3e4d9..60a1fa0 100644 --- a/.github/workflows/php-qa.yml +++ b/.github/workflows/php-qa.yml @@ -26,7 +26,9 @@ jobs: php-version: ${{ matrix.php }} - name: Install Dependencies - run: composer install --prefer-dist --no-progress --no-suggest + uses: ramsey/composer-install@v1 + with: + composer-options: "--prefer-dist" - name: Run PHP Lint run: find . -type f -name "*.php" -exec php -l {} \; From 03870550a9296aabdba08afcda4596fd287fcfa9 Mon Sep 17 00:00:00 2001 From: yeremi Date: Sun, 5 Jan 2025 03:24:59 +0100 Subject: [PATCH 3/3] chore: update release --- .github/workflows/php-qa.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/php-qa.yml b/.github/workflows/php-qa.yml index 60a1fa0..30cc259 100644 --- a/.github/workflows/php-qa.yml +++ b/.github/workflows/php-qa.yml @@ -30,9 +30,6 @@ jobs: with: composer-options: "--prefer-dist" - - name: Run PHP Lint - run: find . -type f -name "*.php" -exec php -l {} \; - - name: Run PHPStan run: ./vendor/bin/phpstan analyse -l 3 src tests --memory-limit=512M