Compare commits
38
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4bddb37de2 | ||
|
|
aa90774738 | ||
|
|
d7e14f6d02 | ||
|
|
4a943a5651 | ||
|
|
f47a5102d6 | ||
|
|
05596bce72 | ||
|
|
c6e84efc28 | ||
|
|
0cbe8046af | ||
|
|
ea32d10fa6 | ||
|
|
deb1b7f9cb | ||
|
|
2d7f607649 | ||
|
|
91eae117ed | ||
|
|
050412eab8 | ||
|
|
d647433c20 | ||
|
|
f1d6e65d9a | ||
|
|
c38b53a321 | ||
|
|
fbede54388 | ||
|
|
6d286cd5d6 | ||
|
|
bc6d8b4411 | ||
|
|
9986f6fe20 | ||
|
|
6bd6afd8f7 | ||
|
|
00714c0fc8 | ||
|
|
c71d5d94ce | ||
|
|
c04e827757 | ||
|
|
6ead75bf73 | ||
|
|
ab3dfe4aba | ||
|
|
df6dbf0295 | ||
|
|
ea8ed80e71 | ||
|
|
e47ea08255 | ||
|
|
4e5b181ffb | ||
|
|
5acdaabaaf | ||
|
|
724dc823fa | ||
|
|
31d9bfe00a | ||
|
|
7bbaaf9a48 | ||
|
|
42b67ce994 | ||
|
|
f991a599f5 | ||
|
|
1775ed80b9 | ||
|
|
1beeb84c90 |
@@ -7,13 +7,14 @@ name: Release
|
||||
- beta
|
||||
- "*.x"
|
||||
permissions:
|
||||
contents: read # for checkout
|
||||
contents: read # for checkout
|
||||
jobs:
|
||||
release:
|
||||
permissions:
|
||||
contents: write # to be able to publish a GitHub release
|
||||
issues: write # to be able to comment on released issues
|
||||
pull-requests: write # to be able to comment on released pull requests
|
||||
contents: write # to be able to publish a GitHub release
|
||||
issues: write # to be able to comment on released issues
|
||||
pull-requests: write # to be able to comment on released pull requests
|
||||
id-token: write # to enable use of OIDC for npm provenance
|
||||
name: release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
@@ -24,6 +24,7 @@ jobs:
|
||||
- 19
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@
|
||||
|
||||
- [Getting started](docs/usage/getting-started.md#getting-started)
|
||||
- [Installation](docs/usage/installation.md#installation)
|
||||
- [CI Configuration](docs/usage/ci-configuration.md#ci-configuration)
|
||||
- [Configuration](docs/usage/configuration.md#configuration)
|
||||
- [CI Configuration](docs/usage/ci-configuration.md)
|
||||
- [Configuration](docs/usage/configuration.md)
|
||||
- [Plugins](docs/usage/plugins.md)
|
||||
- [Workflow configuration](docs/usage/workflow-configuration.md)
|
||||
- [Shareable configurations](docs/usage/shareable-configurations.md)
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
const semanticRelease = require("semantic-release");
|
||||
const { WritableStreamBuffer } = require("stream-buffers");
|
||||
|
||||
const stdoutBuffer = WritableStreamBuffer();
|
||||
const stderrBuffer = WritableStreamBuffer();
|
||||
const stdoutBuffer = new WritableStreamBuffer();
|
||||
const stderrBuffer = new WritableStreamBuffer();
|
||||
|
||||
try {
|
||||
const result = await semanticRelease(
|
||||
|
||||
@@ -171,3 +171,6 @@
|
||||
- `verifyConditions` Validate configuration, `Cargo.toml`, and local cargo executable. Also, logs in into `crates.io`.
|
||||
- `prepare` Write the new version number into `Cargo.toml` file and perform `cargo check` if configured.
|
||||
- `publish` Publish the Rust crate to `crates.io`
|
||||
- [semantic-release-coralogix](https://github.com/adobe/semantic-release-coralogix)
|
||||
- `verifyConditions` Verified that required credentials are provided and API is accessible
|
||||
- `publish` add a release tag to Coralogix
|
||||
|
||||
@@ -158,14 +158,6 @@ Or with the `publishConfig.access` key in your project's `package.json`:
|
||||
}
|
||||
```
|
||||
|
||||
## Can I use semantic-release to publish a package on Artifactory?
|
||||
|
||||
Any npm compatible registry is supported with the [`@semantic-release/npm`](https://github.com/semantic-release/npm) plugin. For Artifactory versions prior to 5.4, the legacy authentication has to be used (with `NPM_USERNAME`, `NPM_PASSWORD` and `NPM_EMAIL` [environment variables](https://github.com/semantic-release/npm#environment-variables)).
|
||||
|
||||
See [npm registry authentication](https://github.com/semantic-release/npm#npm-registry-authentication) for more details.
|
||||
|
||||
See [Artifactory - npm Registry](https://www.jfrog.com/confluence/display/RTF/Npm+Registry#NpmRegistry-AuthenticatingthenpmClient) documentation for Artifactory configuration.
|
||||
|
||||
## Can I manually trigger the release of a specific version?
|
||||
|
||||
You can trigger a release by pushing to your Git repository. You deliberately cannot trigger a _specific_ version release, because this is the whole point of semantic-release.
|
||||
|
||||
@@ -14,7 +14,7 @@ See our [Node Support Policy](node-support-policy.md) for our long-term promise
|
||||
The recommended approach is to run the `semantic-release` command from a CI job running on the latest available LTS version of node.
|
||||
This can either be a job used by your project to test on the latest Node LTS version or a dedicated job for the release steps.
|
||||
|
||||
See [CI configuration](../usage/ci-configuration.md) and [CI configuration recipes](../recipes/release-workflow/README.md#ci-configurations) for more details.
|
||||
See [CI configuration](../usage/ci-configuration.md) and [CI configuration recipes](../recipes/ci-configurations/README.md#ci-configurations) for more details.
|
||||
|
||||
## Alternative solutions
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ Here are a few examples of the CI services that can be used to achieve this:
|
||||
- [Wercker Workflows](http://devcenter.wercker.com/docs/workflows)
|
||||
- [GoCD Pipelines](https://docs.gocd.org/current/introduction/concepts_in_go.html#pipeline).
|
||||
|
||||
See [CI configuration recipes](../recipes/ci-configurations#ci-configurations) for more details.
|
||||
See [CI configuration recipes](../recipes/ci-configurations/README.md) for more details.
|
||||
|
||||
## Authentication
|
||||
|
||||
@@ -45,6 +45,6 @@ See each plugin's documentation for the environment variables required.
|
||||
|
||||
The authentication token/credentials have to be made available in the CI service via environment variables.
|
||||
|
||||
See [CI configuration recipes](../recipes/ci-configurations#ci-configurations) for more details on how to configure environment variables in your CI service.
|
||||
See [CI configuration recipes](../recipes/ci-configurations/README.md) for more details on how to configure environment variables in your CI service.
|
||||
|
||||
**Note**: The environment variables `GH_TOKEN`, `GITHUB_TOKEN`, `GL_TOKEN` and `GITLAB_TOKEN` can be used for both the Git authentication and the API authentication required by [@semantic-release/github](https://github.com/semantic-release/github) and [@semantic-release/gitlab](https://github.com/semantic-release/gitlab).
|
||||
|
||||
Generated
+3242
-7795
File diff suppressed because it is too large
Load Diff
+16
-15
@@ -29,13 +29,13 @@
|
||||
"@semantic-release/commit-analyzer": "^9.0.2",
|
||||
"@semantic-release/error": "^3.0.0",
|
||||
"@semantic-release/github": "^8.0.0",
|
||||
"@semantic-release/npm": "^10.0.0-beta.4",
|
||||
"@semantic-release/npm": "^10.0.2",
|
||||
"@semantic-release/release-notes-generator": "^10.0.0",
|
||||
"aggregate-error": "^4.0.1",
|
||||
"cosmiconfig": "^8.0.0",
|
||||
"debug": "^4.0.0",
|
||||
"env-ci": "^8.0.0",
|
||||
"execa": "^6.1.0",
|
||||
"env-ci": "^9.0.0",
|
||||
"execa": "^7.0.0",
|
||||
"figures": "^5.0.0",
|
||||
"find-versions": "^5.1.0",
|
||||
"get-stream": "^6.0.0",
|
||||
@@ -56,24 +56,24 @@
|
||||
"yargs": "^17.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "5.1.0",
|
||||
"c8": "7.12.0",
|
||||
"ava": "5.2.0",
|
||||
"c8": "7.13.0",
|
||||
"clear-module": "4.1.2",
|
||||
"codecov": "3.8.3",
|
||||
"delay": "5.0.0",
|
||||
"dockerode": "3.3.4",
|
||||
"file-url": "^4.0.0",
|
||||
"fs-extra": "^11.0.0",
|
||||
"got": "^12.5.0",
|
||||
"dockerode": "3.3.5",
|
||||
"file-url": "4.0.0",
|
||||
"fs-extra": "11.1.1",
|
||||
"got": "12.6.0",
|
||||
"js-yaml": "4.1.0",
|
||||
"mockserver-client": "5.15.0",
|
||||
"nock": "13.3.0",
|
||||
"p-retry": "^5.1.1",
|
||||
"prettier": "^2.7.1",
|
||||
"sinon": "15.0.1",
|
||||
"p-retry": "5.1.2",
|
||||
"prettier": "2.8.7",
|
||||
"sinon": "15.0.3",
|
||||
"stream-buffers": "3.0.2",
|
||||
"tempy": "^3.0.0",
|
||||
"testdouble": "3.16.8"
|
||||
"tempy": "3.0.0",
|
||||
"testdouble": "3.17.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
@@ -117,7 +117,8 @@
|
||||
"trailingComma": "es5"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
"access": "public",
|
||||
"provenance": true
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -23,7 +23,10 @@ export async function start() {
|
||||
container = await docker.createContainer({
|
||||
Tty: true,
|
||||
Image: IMAGE,
|
||||
PortBindings: { [`${SERVER_PORT}/tcp`]: [{ HostPort: `${HOST_PORT}` }] },
|
||||
HostConfig: {
|
||||
PortBindings: { [`${SERVER_PORT}/tcp`]: [{ HostPort: `${HOST_PORT}` }] },
|
||||
},
|
||||
ExposedPorts: { [`${SERVER_PORT}/tcp`]: {} },
|
||||
});
|
||||
await container.start();
|
||||
|
||||
|
||||
@@ -19,7 +19,10 @@ export async function start() {
|
||||
container = await docker.createContainer({
|
||||
Tty: true,
|
||||
Image: IMAGE,
|
||||
PortBindings: { [`${MOCK_SERVER_PORT}/tcp`]: [{ HostPort: `${MOCK_SERVER_PORT}` }] },
|
||||
HostConfig: {
|
||||
PortBindings: { [`${MOCK_SERVER_PORT}/tcp`]: [{ HostPort: `${MOCK_SERVER_PORT}` }] },
|
||||
},
|
||||
ExposedPorts: { [`${MOCK_SERVER_PORT}/tcp`]: {} },
|
||||
});
|
||||
await container.start();
|
||||
|
||||
|
||||
@@ -25,8 +25,11 @@ export async function start() {
|
||||
container = await docker.createContainer({
|
||||
Tty: true,
|
||||
Image: IMAGE,
|
||||
PortBindings: { [`${REGISTRY_PORT}/tcp`]: [{ HostPort: `${REGISTRY_PORT}` }] },
|
||||
Binds: [`${path.join(__dirname, "config.yaml")}:/verdaccio/conf/config.yaml`],
|
||||
HostConfig: {
|
||||
PortBindings: { [`${REGISTRY_PORT}/tcp`]: [{ HostPort: `${REGISTRY_PORT}` }] },
|
||||
Binds: [`${path.join(__dirname, "config.yaml")}:/verdaccio/conf/config.yaml`],
|
||||
},
|
||||
ExposedPorts: { [`${REGISTRY_PORT}/tcp`]: {} },
|
||||
});
|
||||
|
||||
await container.start();
|
||||
|
||||
+5
-1
@@ -39,7 +39,11 @@ test.beforeEach((t) => {
|
||||
};
|
||||
});
|
||||
|
||||
test("Plugins are called with expected values", async (t) => {
|
||||
test.afterEach.always((t) => {
|
||||
td.reset();
|
||||
});
|
||||
|
||||
test.serial("Plugins are called with expected values", async (t) => {
|
||||
// Create a git repository, set the current working directory at the root of the repo
|
||||
const { cwd, repositoryUrl } = await gitRepo(true);
|
||||
// Add commits to the master branch
|
||||
|
||||
@@ -598,7 +598,7 @@ test("Log unexpected errors from plugins and exit with 1", async (t) => {
|
||||
// Verify the type and message are logged
|
||||
t.regex(stderr, /Error: a/);
|
||||
// Verify the the stacktrace is logged
|
||||
t.regex(stderr, new RegExp(pluginError));
|
||||
t.regex(stderr, new RegExp(process.platform === "win32" ? pluginError.replace(/\\/g, "\\\\") : pluginError));
|
||||
// Verify the Error properties are logged
|
||||
t.regex(stderr, /errorProperty: 'errorProperty'/);
|
||||
t.is(exitCode, 1);
|
||||
@@ -687,6 +687,7 @@ test("Use the valid git credentials when multiple are provided", async (t) => {
|
||||
BB_TOKEN_BASIC_AUTH: gitbox.gitCredential,
|
||||
GIT_ASKPASS: "echo",
|
||||
GIT_TERMINAL_PROMPT: 0,
|
||||
GIT_CONFIG_PARAMETERS: "'credential.helper='",
|
||||
},
|
||||
branch: { name: "master" },
|
||||
options: { repositoryUrl: "http://toto@localhost:2080/git/test-auth.git" },
|
||||
@@ -707,6 +708,7 @@ test("Use the repository URL as is if none of the given git credentials are vali
|
||||
GITLAB_TOKEN: "trash",
|
||||
GIT_ASKPASS: "echo",
|
||||
GIT_TERMINAL_PROMPT: 0,
|
||||
GIT_CONFIG_PARAMETERS: "'credential.helper='",
|
||||
},
|
||||
branch: { name: "master" },
|
||||
options: { repositoryUrl: dummyUrl },
|
||||
@@ -716,7 +718,7 @@ test("Use the repository URL as is if none of the given git credentials are vali
|
||||
});
|
||||
|
||||
test("ESM Plugin with named exports", async (t) => {
|
||||
const packageName = "log-secret";
|
||||
const packageName = "plugin-exports";
|
||||
// Create a git repository, set the current working directory at the root of the repo
|
||||
t.log("Create git repository");
|
||||
const { cwd, repositoryUrl } = await gitbox.createRepo(packageName);
|
||||
|
||||
Reference in New Issue
Block a user