Skip to content

Commit

Permalink
Update release workflow and create GitHub release for v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
arloor committed Apr 20, 2024
1 parent d80f9a0 commit 9b2a3ef
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches: [ "master" ]

permissions:
contents: write

env:
CARGO_TERM_COLOR: always

Expand All @@ -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

0 comments on commit 9b2a3ef

Please sign in to comment.