Update sync_warp-go.yml

dependabot/github_actions/docker/setup-buildx-action-2.6.0
fscarmen 3 years ago committed by GitHub
parent 7e3fb8f98b
commit f66d169adf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      .github/workflows/sync_warp-go.yml

@ -2,14 +2,18 @@ name: Sync warp-go latest version
on: on:
workflow_dispatch: workflow_dispatch:
# schedule: schedule:
# - cron: '3 2 * * *' - cron: '3 2 * * *'
jobs: jobs:
build: build:
name: Sync warp-go latest version name: Sync warp-go latest version
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
FILE_DIR: warp-go
steps: steps:
- uses: actions/checkout@v3.4.0 - uses: actions/checkout@v3.4.0
- name: Update warp-go to latest version - name: Update warp-go to latest version
@ -37,23 +41,22 @@ jobs:
done done
for j in "${SCRIPTS[@]}"; do for j in "${SCRIPTS[@]}"; do
sed -i "/判断 warp-go 的最新版本/s/$NOW/$LATEST/; /latest=\${/s/$NOW/$LATEST/" ${GITHUB_WORKSPACE}/$j sed -i "/判断 warp-go 的最新版本/s/$NOW/$LATEST/; /latest=\${/s/$NOW/$LATEST/" ${GITHUB_WORKSPACE}/$j || true
done done
echo "VERSION=$LATEST" >> $GITHUB_ENV echo "VERSION=$LATEST" >> $GITHUB_ENV
echo "DIST=${GITHUB_WORKSPACE}/warp-go" >> $GITHUB_ENV
echo "DATE=$(date "+%Y/%m/%d %H:%M:%S")" >> $GITHUB_ENV echo "DATE=$(date "+%Y/%m/%d %H:%M:%S")" >> $GITHUB_ENV
fi fi
- name: Upload to repository - name: Upload to repository
uses: stefanzweifel/git-auto-commit-action@v4.16.0 uses: stefanzweifel/git-auto-commit-action@v4.16.0
if: ${{ env.VERSION != '' }} if: ${{ env.VERSION != '' }}
with: with:
commit_message: Sync warp-go to V${{ env.VERSION }} by Github Actions, ${{ env.DATE }} commit_message: Sync warp-go to V${{ env.VERSION }} by Github Actions, ${{ env.DATE }}
- name: Release binaries - name: Release binaries
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
if: ${{ env.VERSION != '' }} if: ${{ env.VERSION != '' }}
with: with:
tag_name: warp-go_v${{ env.VERSION }} tag_name: warp-go_v${{ env.VERSION }}
files: ${{ env.DIST }}/* files: ${{ env.FILE_DIR }}/*

Loading…
Cancel
Save