1111 repo_name_android : " siyuan-android"
1212 repo_name : " siyuan"
1313 repo_owner : " siyuan-community"
14+ repo_name_upstream : " siyuan"
15+ repo_owner_upstream : " siyuan-note"
1416 package_json : " app/package.json"
1517
1618jobs :
@@ -29,10 +31,10 @@ jobs:
2931 - name : Setup Python
3032 uses : actions/setup-python@v5
3133 with :
32- python-version : " 3.10 "
34+ python-version : " 3.11 "
3335 - run : pip install PyGithub
3436
35- - id : thislatestR
37+ - id : thisLatestRelease
3638 uses : pozetroninc/github-action-get-latest-release@master
3739 with :
3840 # owner: siyuan-note
@@ -41,31 +43,39 @@ jobs:
4143 token : ${{ secrets.GITHUB_TOKEN }}
4244 excludes : prerelease, draft
4345
44- - name : Gather Release Information
45- id : release_info
46- run : |
47- echo "release_title=$(git show --format=%s --no-patch | head -1)" >> $GITHUB_OUTPUT
48- echo "release_version=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
49- changelog=$(python scripts/parse-changelog.py -t ${{ github.ref }} -b ${{ steps.thislatestR.outputs.release }} ${{ env.repo_owner }}/${{ env.repo_name }})
50- EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
51- echo "release_body<<$EOF" >> $GITHUB_ENV
52- echo "$changelog" >> $GITHUB_ENV
53- echo "$EOF" >> $GITHUB_ENV
54- env :
55- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
56-
5746 - name : Extract version from package.json
5847 uses : sergeysova/jq-action@v2
5948 id : version
6049 with :
6150 cmd : " jq .version ${{ env.package_json }} -r"
6251
52+ - name : Extract electronVersion from package.json
53+ uses : sergeysova/jq-action@v2
54+ id : electronVersion
55+ with :
56+ cmd : " jq .devDependencies.electron ${{ env.package_json }} -r"
57+
6358 - name : Extract packageManager from package.json
6459 uses : sergeysova/jq-action@v2
6560 id : packageManager
6661 with :
6762 cmd : " jq .packageManager ${{ env.package_json }} -r"
6863
64+ - name : Gather Release Information
65+ id : release_info
66+ run : |
67+ echo "release_title=$(git show --format=%s --no-patch | head -1)" >> $GITHUB_OUTPUT
68+ echo "release_version=$(TZ=Asia/Shanghai date +'v%Y%m%d%H%M')" >> $GITHUB_OUTPUT
69+ changelog_header=$(python scripts/parse-changelog-HEAD.py -t ${{ github.ref }} -b ${{ steps.thisLatestRelease.outputs.release }} -e ${{ steps.electronVersion.outputs.value }} ${{ env.repo_owner }}/${{ env.repo_name }})
70+ changelog=$(python scripts/parse-changelog.py -t ${{ github.ref }} ${{ env.repo_owner_upstream }}/${{ env.repo_name_upstream }})
71+ EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
72+ echo "release_body<<$EOF" >> $GITHUB_ENV
73+ echo "$changelog_header" >> $GITHUB_ENV
74+ echo "$changelog" >> $GITHUB_ENV
75+ echo "$EOF" >> $GITHUB_ENV
76+ env :
77+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
78+
6979 - name : Create Release
7080 id : create_release
7181 uses : ncipollo/release-action@v1
@@ -222,7 +232,7 @@ jobs:
222232 GOPATH : ${{ github.workspace }}/go
223233 GOARCH : ${{ matrix.config.goarch }}
224234
225- - name : Building Electron
235+ - name : Building Electron App
226236 run : pnpm run ${{ matrix.config.electron_args }}
227237 working-directory : ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app
228238
0 commit comments