Skip to content

Commit 04c6a03

Browse files
authored
Merge pull request #13 from semantic-release/feat/migration
feat: Moved the package to namespace
2 parents 9bd918c + d5a3527 commit 04c6a03

13 files changed

+46
-211
lines changed
+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": [
4-
"config:base"
5-
]
3+
"extends": ["github>semantic-release/.github"]
64
}

.github/workflows/release.yml

+22-32
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,33 @@
11
name: Release
2-
on:
2+
'on':
33
push:
44
branches:
55
- master
6+
- next
7+
- beta
8+
- '*.x'
69
permissions:
7-
contents: read
10+
contents: read # for checkout
811
jobs:
912
release:
10-
name: Release
11-
runs-on: ubuntu-latest
1213
permissions:
13-
contents: write
14-
id-token: write
15-
issues: write
16-
pull-requests: write
14+
contents: write # to be able to publish a GitHub release
15+
issues: write # to be able to comment on released issues
16+
pull-requests: write # to be able to comment on released pull requests
17+
id-token: write # to enable use of OIDC for npm provenance
18+
name: release
19+
runs-on: ubuntu-latest
1720
steps:
18-
- name: Checkout
19-
uses: actions/checkout@v3
20-
with:
21-
fetch-depth: 0
22-
- name: Setup Node.js
23-
uses: actions/setup-node@v3
21+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
22+
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
2423
with:
25-
node-version: 18
26-
cache: 'npm'
27-
- name: Install dependencies
28-
run: npm install
29-
- name: Lint
30-
run: npm run lint
31-
- name: Test
32-
run: npm run test:setup && npm run test
33-
- name: Build
34-
run: 'npm run build:production'
35-
- name: Release
24+
cache: npm
25+
node-version: lts/*
26+
- run: npm clean-install
27+
- run: npm audit signatures
28+
# pinned version updated automatically by Renovate.
29+
# details at https://semantic-release.gitbook.io/semantic-release/usage/installation#global-installation
30+
- run: npm run semantic-release
3631
env:
37-
GIT_AUTHOR_NAME: 'oblakbot'
38-
GIT_AUTHOR_EMAIL: '[email protected]'
39-
GIT_COMMITTER_NAME: 'oblakbot'
40-
GIT_COMMITTER_EMAIL: '[email protected]'
41-
GITHUB_TOKEN: ${{ secrets.OBLAK_BOT_TOKEN }}
42-
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
43-
run: npm run semantic-release
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_NPM_TOKEN }}

.releaserc

-48
This file was deleted.

CHANGELOG.md

-110
This file was deleted.

README.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,24 @@ Plugin uses no environment variables, but has a lot of configuration options
6565

6666
### Versioning
6767

68-
**Version in your plugin / theme must be set to 0.0.0 for this plugin to work**
69-
7068
Plugin will automatically replace versions in your main file (for plugins) and the ``style.css`` file (for themes).
7169
We follow the WordPress codex, so your plugin file must have the same slug as the plugin folder.
7270

7371
If you have other variables which need to have the version replaced, you can add them to the `versionFiles` option.
7472

7573
If you need any further processing of the package files, next release version will be output to `/tmp/wp-release/VERSION` file, if the `withVersionFile` option is set to `true`.
7674

75+
> **Warning**
76+
> Version in your plugin / theme must be set to 0.0.0 for this plugin to work
77+
7778
### Assets
7879
If your package is on [wp.org](https://wordpress.org) repository, you might have assets (screenshots, banners, logos) which you want to include in the assets file. Plugin respects the Codex, and expects those to be in ``.wordpress-org/assets`` folder. Main theme screenshot should be named ``screenshot`` and should be there as well.
7980

8081
### Readme
81-
readme.txt is a special Markdown file needed for packages on [wp.org](https://wordpress.org) to work. It needs to be in the `.wordpress-org` folder, and the version should be `0.0.0` as well. Plugin will automatically replace the version in the file if the `withReadme` option is set to `true`.
82+
readme.txt is a special Markdown file needed for packages on [wp.org](https://wordpress.org) to work. It needs to be in the `.wordpress-org` folder. Plugin will automatically replace the version in the file if the `withReadme` option is set to `true`.
83+
84+
> ** Warning**
85+
> Version in your readme.txt must also be set to 0.0.0 for this plugin to work
8286
8387
### Include / Exclude
8488
By default, plugin will include all files in the package zip file. If you want to exclude some files, you can use the `exclude` option. It accepts an array of files and folders, and uses [glob](https://npmjs.com/package/glob) for path resolution.
@@ -91,6 +95,7 @@ You can also use the `include` option which works in the same manner.
9195
* By default we exclude a lot of build artifacts and files which are not needed in the package. You can see the full list in [constants.ts](lib/constants.ts).
9296

9397
### Examples
98+
9499
Plugin with assets, readme and additional version files
95100

96101
```json

lib/@types/semantic-release/index.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
declare module 'semantic-release' {
22
import { Signale } from 'signale';
3-
import AggregateError = require('aggregate-error');
43
export interface EnvCi {
54
/**
65
* Boolean, true if the environment is a CI environment

lib/utils/verify-plugin.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as path from 'node:path';
22
import fs from 'fs-extra';
3-
import AggregateError from 'aggregate-error';
43
import SemanticReleaseError from '@semantic-release/error';
54
import getError from './get-error.js';
65
import { PluginConfig } from '../classes/plugin-config.class.js';

lib/utils/verify-theme.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as path from 'node:path';
22
import fs from 'fs-extra';
3-
import AggregateError from 'aggregate-error';
43
import SemanticReleaseError from '@semantic-release/error';
54
import getError from './get-error.js';
65
import { PluginConfig } from '../classes/plugin-config.class.js';

lib/verify-conditions.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { PluginConfig } from './classes/plugin-config.class.js';
22
import verifyConfig from './utils/verify-config.js';
3-
import AggregateError from 'aggregate-error';
43
import { verifyPlugin } from './utils/verify-plugin.js';
54
import { VerifyConditionsContext } from 'semantic-release';
65
import getError from './utils/get-error.js';

package-lock.json

+6-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
{
2-
"name": "semantic-release-wp-plugin",
3-
"version": "0.0.0",
2+
"name": "@semantic-release/wordpress",
3+
"version": "0.0.0-development",
44
"license": "MIT",
5-
"contributors": [],
5+
"author": "Sibin Grasic <[email protected]> (https://oblak.studio)",
6+
"contributors": [
7+
"Gregor Martynus (https://twitter.com/gr2m)",
8+
"Matt Travi <[email protected]> (https://matt.travi.org/)"
9+
],
610
"repository": {
711
"type": "git",
8-
"url": "https://github.com/oblakstudio/semantic-release-wp-plugin.git"
12+
"url": "git+https://github.com/semantic-release/wordpress.git"
913
},
10-
"bugs": "https://githu.com/oblakstudio/semantic-release-wp-plugin/issues",
14+
"bugs": "https://githu.com/semantic-release/wordpress/issues",
1115
"keywords": [],
1216
"scripts": {
1317
"build": "rimraf dist && tsc --project tsconfig.build.json",
@@ -28,7 +32,6 @@
2832
"types": "dist/index.d.ts",
2933
"dependencies": {
3034
"@semantic-release/error": "^4.0.0",
31-
"aggregate-error": "^4.0.1",
3235
"class-transformer": "^0.5.1",
3336
"class-transformer-validator": "^0.9.1",
3437
"class-validator": "^0.14.0",

test/1-verify-plugin.spec.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import AggregateError from 'aggregate-error';
21
import { verifyConditions } from '../lib/verify-conditions.js';
32
import SemanticReleaseError from '@semantic-release/error';
43
import { VerifyConditionsContext } from 'semantic-release';

test/1-verify-theme.spec.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import AggregateError from 'aggregate-error';
21
import { verifyConditions } from '../lib/verify-conditions.js';
32
import SemanticReleaseError from '@semantic-release/error';
43
import { VerifyConditionsContext } from 'semantic-release';

0 commit comments

Comments
 (0)