-
Notifications
You must be signed in to change notification settings - Fork 209
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
liuganghuan
committed
Jan 5, 2024
1 parent
76e94ad
commit 9de1216
Showing
12 changed files
with
313 additions
and
320 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: auto_release | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
all: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set outputs | ||
id: vars | ||
run: echo "sha_short=$(git rev-parse --short=8 HEAD)" >> $GITHUB_OUTPUT | ||
- name: build_musl | ||
id: build_musl | ||
uses: arloor/rust_musl_action@v2 | ||
- name: mv_musl_bin | ||
run: | | ||
# 如果target/release/不存在,则创建该文件夹 | ||
if [ ! -d "target/release/" ]; then | ||
mkdir -p target/release/ | ||
fi | ||
cp ${{ steps.build_musl.outputs.release_dir }}dnat target/release/dnat; | ||
- name: gihub_release | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
if $(gh release delete v1.0.0 -y --cleanup-tag); | ||
then echo "delete old release"; | ||
else echo "no old release"; | ||
fi | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "arloor" | ||
# git tag -f v1.0.0 -m 'latest' | ||
# git push --force origin v1.0.0 | ||
gh release create v1.0.0 target/release/dnat -n "latest" --latest -t latest --target master |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"unwantedRecommendations": [ | ||
"ms-vscode-remote.remote-containers", | ||
"ms-azuretools.vscode-docker" | ||
], | ||
"recommendations": [] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
// 使用 IntelliSense 了解相关属性。 | ||
// 悬停以查看现有属性的描述。 | ||
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug", | ||
"program": "${workspaceFolder}/target/debug/dnat", | ||
"args": ["nat.conf"], | ||
"cwd": "${workspaceFolder}", | ||
"preLaunchTask": "rust: cargo build", | ||
"env": { | ||
"HOSTNAME":"test" | ||
} | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"github-actions.workflows.pinned.workflows": [ | ||
".github/workflows/release.yml" | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "cargo", | ||
"command": "build", | ||
"problemMatcher": [ | ||
"$rustc" | ||
], | ||
"group": { | ||
"kind": "build" | ||
|
||
}, | ||
"label": "rust: cargo build" | ||
} | ||
] | ||
} |
Oops, something went wrong.