This repository has been archived by the owner on Aug 18, 2021. It is now read-only.
generated from Qv2ray/QvPlugin-Template
-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Qv2ray-dev
authored and
Qv2ray-dev
committed
Apr 25, 2020
1 parent
d5e95fe
commit f00f396
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Update release files hash | ||
|
||
on: | ||
release: | ||
types: [edited] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- run: echo ::set-env name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) | ||
shell: bash | ||
- run: echo ::set-env name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}') | ||
shell: bash | ||
- name: Checking out sources | ||
uses: actions/checkout@master | ||
- name: Hash File | ||
shell: bash | ||
run: | | ||
wget -O release.info https://api.github.com/repos/Qv2ray/${REPOSITORY_NAME}/releases/tags/${VERSION} | ||
cat ./release.info | jq -r ".assets | .[] | .browser_download_url" > download.list | ||
cat ./release.info | jq -r ".assets | .[] | { uploader_id: .uploader.login, asset_name: .name }" > assets.info.json | ||
mkdir files | ||
cd files | ||
for x in $(cat ../download.list); do | ||
wget "$x"; | ||
done; | ||
rm assets.info.json || true | ||
rm sha256.list || true | ||
sha256sum ./* > ../sha256.list | ||
- name: Upload metadata to release | ||
uses: svenstaro/upload-release-action@v1-release | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: assets.info.json | ||
asset_name: assets.info.json | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
- name: Upload metadata to release | ||
uses: svenstaro/upload-release-action@v1-release | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: sha256.list | ||
asset_name: sha256.list | ||
tag: ${{ github.ref }} | ||
overwrite: true |