|
|
|
|
@ -18,7 +18,7 @@ jobs: |
|
|
|
|
- uses: actions/checkout@v3.4.0 |
|
|
|
|
- name: Update warp-go to latest version |
|
|
|
|
run: | |
|
|
|
|
NOW=$(wget -qO- https://raw.githubusercontent.com/${{ env.USERNAME }}/${{ env.REPO }}/main/warp-go.sh | grep 'latest=${latest' | cut -d \' -f2) |
|
|
|
|
NOW=$(wget -qO- https://raw.githubusercontent.com/${{ github.repository }}/main/warp-go.sh | grep 'latest=${latest' | cut -d \' -f2) |
|
|
|
|
LATEST=$(wget -qO- -T1 -t1 https://gitlab.com/api/v4/projects/ProjectWARP%2Fwarp-go/releases | grep -oP '"tag_name":"v\K[^\"]+' | head -n 1) |
|
|
|
|
if [ "$LATEST" != "$NOW" ]; then |
|
|
|
|
[ ! -d ${GITHUB_WORKSPACE}/warp-go ] && mkdir -p ${GITHUB_WORKSPACE}/warp-go |
|
|
|
|
@ -46,16 +46,14 @@ jobs: |
|
|
|
|
|
|
|
|
|
echo "VERSION=$LATEST" >> $GITHUB_ENV |
|
|
|
|
echo "DIST=${GITHUB_WORKSPACE}/warp-go" >> $GITHUB_ENV |
|
|
|
|
echo "DATE=$(date "+%Y/%m/%d %H:%M:%S")" >> $GITHUB_ENV |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
- name: Upload to REPO |
|
|
|
|
- name: Upload to repository |
|
|
|
|
uses: stefanzweifel/git-auto-commit-action@v4.16.0 |
|
|
|
|
if: ${{ env.VERSION != '' }} |
|
|
|
|
run: | |
|
|
|
|
git config --global user.email "${{ env.EMAIL }}" |
|
|
|
|
git config --global user.name "${{ env.USERNAME }}" |
|
|
|
|
git add . |
|
|
|
|
git commit -m "Sync warp-go to V${{ env.VERSION }} by Github Actions, $(date "+%Y/%m/%d %H:%M:%S")" |
|
|
|
|
git push |
|
|
|
|
with: |
|
|
|
|
commit_message: Sync warp-go to V${{ env.VERSION }} by Github Actions, ${{ env.DATE }} |
|
|
|
|
|
|
|
|
|
- name: Release binaries |
|
|
|
|
uses: softprops/action-gh-release@v1 |
|
|
|
|
|