-
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.
Update release workflow and create GitHub release for v1.0.0
- Loading branch information
Showing
1 changed file
with
8 additions
and
5 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 |
---|---|---|
|
@@ -6,6 +6,9 @@ on: | |
pull_request: | ||
branches: [ "master" ] | ||
|
||
permissions: | ||
contents: write | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
|
@@ -31,16 +34,16 @@ jobs: | |
mkdir -p target/release/ | ||
fi | ||
cp ${{ steps.build_musl.outputs.release_dir }}dnat target/release/dnat; | ||
- name: gihub_release | ||
- name: gihub release | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
if $(gh release delete v1.0.0 -y --cleanup-tag); | ||
version='1.0.0' | ||
if $(gh release delete v${version} -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 target/release/dnat_gnu -n "latest" --latest -t latest --target master | ||
gh release create v${version} target/release/dnat target/release/dnat_gnu -n "$version" -t "$version" --latest |