Skip to content

Commit aad0e6a

Browse files
committed
ci: add release workflow
1 parent 608c236 commit aad0e6a

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-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+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
env:
9+
RELEASE_TAR: ./dist/hugo-geekdoc.tar.gz
10+
11+
jobs:
12+
release:
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
cache: 'npm'
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Build assets
25+
run: npm run build
26+
27+
- name: Pack
28+
run: npm run pack
29+
30+
- name: Extract release to directory
31+
run: |
32+
tar -xf ./dist/hugo-geekdoc.tar.gz --directory ./dist/release
33+
34+
- name: Push to dist branch
35+
uses: s0/git-publish-subdir-action@develop
36+
env:
37+
REPO: self
38+
BRANCH: dist
39+
FOLDER: dist/release
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)