forked from typecho/typecho
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (32 loc) · 1.15 KB
/
Typecho-release-Ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Typecho Build Release Ci
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build
run: |
mkdir build
cp -r LICENSE.txt index.php install.php admin install usr var build/
mkdir build/usr/uploads/
chmod 755 build/usr/uploads/
rm -rf build/admin/src
rm -rf build/usr/themes/classic-22/static/scss
cd build && zip -q -r typecho.zip * && mv typecho.zip ../ && cd -
- name: Upload Release Asset
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./typecho.zip
asset_name: typecho.zip
asset_content_type: application/zip
- name: Trigger language build
run: |
curl -XPOST -H "Authorization: token ${{ secrets.WORKFLOW_TOKEN }}" \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Content-Type: application/json" \
https://api.github.com/repos/typecho/languages/actions/workflows/update.yml/dispatches --data '{"ref": "master"}'