-
Notifications
You must be signed in to change notification settings - Fork 1
106 lines (92 loc) · 2.85 KB
/
document.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Document
on:
push:
branches: ["main","master","cai" ]
pull_request:
branches: ["main","master","cai" ]
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Initialize Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Pandoc
run:
sudo apt-get install pandoc
env:
PYTHONIOENCODING: 'utf-8'
- name: Install TeX Live
run: |
sudo apt-get install -y texlive-xetex
- name: Package
run:
sudo python DocHelper.py
env:
PYTHONIOENCODING: 'utf-8'
- name: Temporary Upload Doc
uses: actions/upload-artifact@v4
with:
name: TShock插件编写从入门到跑路
path: TShock插件编写从入门到跑路.pdf
LatestRelease:
name: Latest Release
if: github.event_name == 'push'
runs-on: ubuntu-latest
needs: Build
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Changelog
id: external_changelog_second
uses: mikepenz/release-changelog-builder-action@v4
with:
configuration: "Config/Config_Rep.json"
#cache: ${{ steps.external_changelog_collect.outputs.cache }}
- name: Echo External Repo Configuration Changelog
env:
CHANGELOG: ${{ steps.external_changelog_second.outputs.changelog }}
CHANGELOG_SECOND: ${{ steps.external_changelog_second.outputs.changelog }}
run: |
echo ${{ steps.external_changelog_collect.outputs.cache }}
echo "First:"
echo "$CHANGELOG"
echo "Second:"
echo "$CHANGELOG_SECOND"
- name: Update Tag
run: |
git tag -f V1.0.0.0
git push -f origin V1.0.0.0
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: TShock插件编写从入门到跑路
path: ./
- name: Update Latest Release
uses: ncipollo/release-action@v1
with:
tag: V1.0.0.0
name: "Latest Version"
body: "🥳这里是文档的PDF发布,你可以在这里下载整份教程。\n${{steps.external_changelog_second.outputs.changelog}}"
artifacts: |
TShock插件编写从入门到跑路.pdf
allowUpdates: true
removeArtifacts: true
ClearTempArtifacts:
name: Clear Temp Artifacts
if: github.event_name == 'push'
runs-on: ubuntu-latest
needs:
- LatestRelease
permissions:
actions: write
steps:
- uses: geekyeggo/delete-artifact@v5
with:
name: |
TShock插件编写从入门到跑路