mirror of
https://github.com/MetaCubeX/meta-rules-dat.git
synced 2024-12-29 19:44:14 +08:00
Test with another release action
This commit is contained in:
parent
532962de2b
commit
bce5ab64eb
24
.github/workflows/build.yml
vendored
24
.github/workflows/build.yml
vendored
@ -122,28 +122,14 @@ jobs:
|
|||||||
sha256sum geoip.dat > geoip.dat.sha256sum
|
sha256sum geoip.dat > geoip.dat.sha256sum
|
||||||
sha256sum geosite.dat > geosite.dat.sha256sum
|
sha256sum geosite.dat > geosite.dat.sha256sum
|
||||||
|
|
||||||
- name: Create a release
|
- name: Release and upload assets
|
||||||
id: create_release
|
uses: softprops/action-gh-release@v1
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
|
name: ${{ env.RELEASE_NAME }}
|
||||||
tag_name: ${{ env.TAG_NAME }}
|
tag_name: ${{ env.TAG_NAME }}
|
||||||
release_name: ${{ env.RELEASE_NAME }}
|
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
files: |
|
||||||
- name: Upload assets
|
./publish/*
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
release_id: ${{ steps.create_release.outputs.id }}
|
|
||||||
run: |
|
|
||||||
files=$(ls ./publish)
|
|
||||||
for ASSET in ${files}; do
|
|
||||||
FILEPATH="./publish/${ASSET}"
|
|
||||||
FILETYPE=$(file -b --mime-type "${FILEPATH}")
|
|
||||||
CONTENT_TYPE_HEADER="Content-Type: ${FILETYPE}"
|
|
||||||
AUTH_HEADER="Authorization: token ${{ env.GITHUB_TOKEN }}"
|
|
||||||
URL="https://uploads.github.com/repos/${{ github.repository }}/releases/${{ env.release_id }}/assets?name=${ASSET}"
|
|
||||||
curl -sSL -X POST -H "${AUTH_HEADER}" -H "${CONTENT_TYPE_HEADER}" --data-binary @${FILEPATH} ${URL}
|
|
||||||
done
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user