Skip to content

Commit

Permalink
CI: release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
sqzw-x committed Jan 19, 2024
1 parent b6b8e86 commit 154505d
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 66 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,24 @@ jobs:
# path: |
# .\MDCx


- name: Get changelog
id: get-changelog
if: ${{ matrix.build == 'macos' }}
run: |
echo 'CHANGELOG<<EOF' >> $GITHUB_OUTPUT
cat changelog.md >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: Create Release - macOS
uses: svenstaro/upload-release-action@2.7.0
if: ${{ matrix.build == 'macos' }}
with:
asset_name: MDCx-$tag-${{ matrix.build }}-${{ matrix.arch }}.app.zip
file: MDCx.app.zip
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre-') }}
body: |
${{ steps.get-changelog.outputs.CHANGELOG }}
- name: Create Release - Windows
uses: svenstaro/upload-release-action@2.7.0
Expand Down
40 changes: 0 additions & 40 deletions build-conda.ps1

This file was deleted.

24 changes: 0 additions & 24 deletions build.ps1

This file was deleted.

24 changes: 24 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
time=$(date +"%Y-%m-%d_%H-%M-%S")

FileName="MDCx-$time.exe"
echo "Output File: $FileName"

pyi-makespec -n "$FileName" -F \
-i resources/Img/MDCx.ico \
-w main.py \
-p "./src" \
--add-data "resources;resources" \
--add-data "libs;." \
--hidden-import socks \
--hidden-import urllib3 \
--hidden-import _cffi_backend \
--collect-all curl_cffi

rm -rf dist

pyinstaller "$FileName.spec"

rm -rf build
rm -f "$FileName.spec"

echo 'Done'
2 changes: 0 additions & 2 deletions changelog.ps1

This file was deleted.

15 changes: 15 additions & 0 deletions changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
tags=$(git tag -l '120*' --sort=-v:refname)
last=$(echo "$tags" | sed -n '2p')
commitlog=$(git log --pretty=format:"%h %s" $last..HEAD)

echo "## 新增
*
## 修复
*
<details>
<summary>Full Changelog</summary>
$commitlog
</details>" > changelog.md # use "" to keep \n in $commitlog

0 comments on commit 154505d

Please sign in to comment.