Skip to content

Commit b16ab6f

Browse files
ci: add release workflow (#369)
1 parent 5289b2d commit b16ab6f

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.github/workflows/release.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release
2+
3+
permissions: {}
4+
5+
on:
6+
repository_dispatch:
7+
types: [trigger-release]
8+
9+
jobs:
10+
release:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node-version: [22]
15+
steps:
16+
- name: Obtain token
17+
id: obtainToken
18+
uses: tibdex/github-app-token@v2
19+
with:
20+
private_key: ${{ secrets.HOMARR_DOCS_RELEASE_APP_PRIVATE_KEY }}
21+
app_id: ${{ vars.HOMARR_DOCS_RELEASE_APP_ID }}
22+
- name: Checkout code
23+
env:
24+
GITHUB_TOKEN: ${{ steps.obtainToken.outputs.token }}
25+
uses: actions/checkout@v5
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
cache: 'pnpm'
31+
- run: pnpm install
32+
- run: |
33+
RAW_TAG="${{ github.event.client_payload.tag }}"
34+
CLEAN_TAG="${RAW_TAG#v}"
35+
pnpm run docusaurus docs:version $CLEAN_TAG
36+
- uses: EndBug/add-and-commit@v9
37+
with:
38+
default_author: github_actor
39+
message: 'docs: add version ${{ github.event.client_payload.tag }}'
40+
push: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
/node_modules
66
/.pnp
77
.pnp.js
8+
.pnpm-store/
89

910
# testing
1011
/coverage

0 commit comments

Comments
 (0)