Skip to content

Commit 75ac5c1

Browse files
authored
Merge pull request #73 from scop/chore/release-workflow
chore(ci): release automation
2 parents 223ecb3 + 784a912 commit 75ac5c1

6 files changed

Lines changed: 7019 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: daily
7+
- package-ecosystem: npm
8+
directory: /
9+
schedule:
10+
interval: daily

.github/workflows/release.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
issues: write
15+
pull-requests: write
16+
steps:
17+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
with:
19+
fetch-depth: 0
20+
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
21+
with:
22+
node-version: 22
23+
check-latest: true
24+
cache: npm
25+
- name: Configure puppeteer to cache in npm cache dir
26+
run: |
27+
printf "PUPPETEER_CACHE_DIR=%s\n" "$(npm config get cache)/puppeteer-cache" >>"$GITHUB_ENV"
28+
- name: Install dependencies
29+
run: npm ci
30+
- name: Release
31+
env:
32+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
WHMCSMP_USERNAME: ${{ secrets.WHMCSMP_USERNAME }}
34+
WHMCSMP_PASSWORD: ${{ secrets.WHMCSMP_PASSWORD }}
35+
WHMCSMP_PRODUCTID: "7770"
36+
WHMCSMP_MINVERSION: "7.0"
37+
run: npx semantic-release

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules/

.releaserc.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
release:
2+
branches:
3+
- main
4+
5+
plugins:
6+
- "@semantic-release/commit-analyzer"
7+
- "@semantic-release/release-notes-generator"
8+
- - semantic-release-replace-plugin
9+
- replacements:
10+
- files:
11+
- modules/servers/upCloudVps/lib/upCloudVps.php
12+
from: "'MODULE_VERSION', '.+?'"
13+
to: "'MODULE_VERSION', '${nextRelease.version}'"
14+
results:
15+
- file: modules/servers/upCloudVps/lib/upCloudVps.php
16+
hasChanged: true
17+
numMatches: 1
18+
numReplacements: 1
19+
countMatches: true
20+
- - "@semantic-release/git"
21+
- assets:
22+
- modules/servers/upCloudVps/lib/upCloudVps.php
23+
message: "chore: release ${nextRelease.version} [skip ci]"
24+
- "@semantic-release/github"
25+
- "@hexonet/semantic-release-whmcs"

0 commit comments

Comments
 (0)