Skip to content

Commit 84d3b6d

Browse files
committed
fix: add SLACK_WEBHOOK to woodpecker allowed secrets
1 parent f9e0552 commit 84d3b6d

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

adminforth/documentation/blog/2025-01-09-how-adminforth-manages-version/index.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,47 @@ In `package.json` add:
8181
//diff-add
8282
"release": {
8383
//diff-add
84-
"branches": [main", "next"]
84+
"branches": [main", "next"],
85+
//diff-add
86+
"plugins": [
87+
//diff-add
88+
[
89+
//diff-add
90+
"@semantic-release/exec",
91+
//diff-add
92+
{
93+
//diff-add
94+
"prepareCmd": "npm run build"
95+
//diff-add
96+
}
97+
//diff-add
98+
],
99+
//diff-add
100+
"@semantic-release/commit-analyzer",
101+
//diff-add
102+
"@semantic-release/release-notes-generator",
103+
//diff-add
104+
"@semantic-release/npm",
105+
//diff-add
106+
"@semantic-release/github"
107+
//diff-add
108+
],
85109
//diff-add
86110
}
87111
}
88112
```
89113

90114
Make sure name in package.json has your organisation name like mine `@devforth/` and you have access to publish packages to npmjs.com.
91115

116+
117+
Also install `semantic-release` and `@semantic-release/exec`:
118+
92119
```
93120
npm i -D semantic-release @semantic-release/exec
94121
```
95122

123+
We use `@semantic-release/exec` to run `npm run build` as prepare step for release. Of course you can run build before calling `semantic-release` in CI pipleine, but this approach will allow to nativeley integrate it with `semantic-release` and e.g. show build errors in semantic-release notification plugins.
124+
96125
## Connecting to CI
97126

98127
We will use Woodpecker CI for this example. Woodpecker is a free and open-source CI/CD tool that you can install to your own server / VPS and will not need to pay only for server. No limits on pipelines, users, repositories, etc. If you want to try it, we have [Woodpecker installation guide](https://devforth.io/blog/step-by-step-guide-to-modern-secure-ci-setup/)

live-demo/deploy/.woodpecker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ steps:
1717
commands:
1818
- cd adminforth
1919
- npm clean-install
20-
# - npm run build
2120
- npm audit signatures
2221
- npx semantic-release
2322
secrets:
2423
- GITHUB_TOKEN
2524
- NPM_TOKEN
25+
- SLACK_WEBHOOK
2626

2727
build-live-demo:
2828
when:

0 commit comments

Comments
 (0)