Update build-and-release.yml

This commit is contained in:
Chai Feng 2024-10-07 11:17:15 +08:00 committed by GitHub
parent 8beec78502
commit 151447b0e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,27 +25,12 @@ jobs:
chmod +x ./build.sh chmod +x ./build.sh
./build.sh ./build.sh
- name: Get current date - name: Create release
id: get_date
run: echo "RELEASE_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: sha: ${{ github.sha }}
tag_name: "latest" run: |
release_name: "Proxy PAC Release - ${{ env.RELEASE_DATE }}" gh release create "$tag" \
draft: false --repo="$GITHUB_REPOSITORY" \
prerelease: false --title="${GITHUB_REPOSITORY#*/} $(date '+%Y-%m-%d-')${sha:0:7}" \
./proxy.pac
- name: Upload Proxy.pac to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.create_release.outputs.id }}
asset_path: ./proxy.pac
asset_name: proxy.pac
asset_content_type: application/x-ns-proxy-autoconfig