-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
34 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # 确保检出完整的Git历史 | ||
fetch-depth: 0 # Ensures full Git history is checked out | ||
|
||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v5 | ||
|
@@ -38,7 +38,7 @@ jobs: | |
- name: Build executables (Linux) | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
for script in BestDnsUpdater.py BestHostsUpdater-IPv4.py BestHostsUpdater.py; do | ||
for script in SetDNS.py SetHosts-IPv4.py SetHosts.py; do | ||
pyinstaller --onefile "$script" | ||
mv "dist/${script%.py}" "dist/${script%.py}-Linux-x64" | ||
done | ||
|
@@ -47,7 +47,7 @@ jobs: | |
- name: Build executables (Windows) | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
$scripts = @("BestDnsUpdater.py", "BestHostsUpdater-IPv4.py", "BestHostsUpdater.py") | ||
$scripts = @("SetDNS.py", "SetHosts-IPv4.py", "SetHosts.py") | ||
if (Test-Path -Path "dist") { | ||
Remove-Item -Recurse -Force "dist" | ||
} | ||
|
@@ -62,7 +62,7 @@ jobs: | |
- name: Build executables (macOS) | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
for script in BestDnsUpdater.py BestHostsUpdater-IPv4.py BestHostsUpdater.py; do | ||
for script in SetDNS.py SetHosts-IPv4.py SetHosts.py; do | ||
pyinstaller --onefile "$script" | ||
mv "dist/${script%.py}" "dist/${script%.py}-macOS-x64" | ||
done | ||
|
@@ -86,7 +86,7 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # 确保检出完整的Git历史 | ||
fetch-depth: 0 # Ensures full Git history is checked out | ||
|
||
- name: Download all artifacts | ||
uses: actions/download-artifact@v3 | ||
|
@@ -95,13 +95,15 @@ jobs: | |
id: tag_description | ||
run: | | ||
TAG_DESCRIPTION=$(git tag -l --format='%(contents)' ${{ github.ref_name }}) | ||
echo "tag_description=${TAG_DESCRIPTION}" >> $GITHUB_ENV | ||
echo "tag_description=${TAG_DESCRIPTION}" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
- name: Get latest commit message | ||
id: commit_message | ||
run: | | ||
COMMIT_MESSAGE=$(git log -1 --pretty=%B) | ||
echo "commit_message=${COMMIT_MESSAGE}" >> $GITHUB_ENV | ||
echo "commit_message=${COMMIT_MESSAGE}" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
- name: Delete existing release | ||
uses: dev-drprasad/[email protected] | ||
|
@@ -110,24 +112,23 @@ jobs: | |
delete_release: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
||
- name: List Files | ||
run: ls -R ./ | ||
shell: bash | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref_name }} | ||
release_name: "${{ github.ref_name }} ${{ env.tag_description }}" | ||
draft: false | ||
prerelease: false | ||
run: | | ||
gh release create ${{ github.ref_name }} \ | ||
--title "${{ github.ref_name }} ${{ steps.tag_description.outputs.tag_description }}" \ | ||
--notes "Release for ${{ github.ref_name }} | ||
- name: Upload Release Assets | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
**/cnNetTool-Linux-x64.zip | ||
**/cnNetTool-Windows-x64.zip | ||
**/cnNetTool-macOS-x64.zip | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
Changes in this release: | ||
${{ steps.commit_message.outputs.commit_message }}" \ | ||
--draft=false \ | ||
./cnNetTool-Linux-x64.zip \ | ||
./cnNetTool-Windows-x64.zip \ | ||
./cnNetTool-macOS-x64.zip | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.