Release OneDesign #24
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
name: Release OneDesign | |
on: | |
workflow_dispatch: | |
jobs: | |
download-release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Download release info | |
run: | | |
curl -H "Authorization: token ${{ secrets.TOKEN }}" \ | |
https://api.github.com/repos/qlenlen/OneDesign/releases/latest \ | |
-o release_info.json | |
cat release_info.json | |
mkdir assets | |
- name: Download all assets | |
run: | | |
ASSET_INFO=$(jq -r '.assets[] | "\(.id) \(.name)"' release_info.json) | |
while IFS= read -r line; do | |
ASSET_ID=$(echo $line | awk '{print $1}') | |
echo $ASSET_ID | |
ASSET_NAME=$(echo $line | awk '{print $2}') | |
echo $ASSET_NAME | |
curl -L -H "Authorization: token ${{ secrets.TOKEN }}" \ | |
-H "Accept: application/octet-stream" \ | |
"https://api.github.com/repos/qlenlen/OneDesign/releases/assets/$ASSET_ID" \ | |
-o $ASSET_NAME | |
done <<<"$ASSET_INFO" | |
mv *.apk assets | |
- name: Upload assets | |
uses: actions/[email protected] | |
with: | |
name: kernel_samsung_dm3q | |
path: assets | |
- name: Generate TAG | |
run: | | |
DATE=$(date +'%y.%m.%d') | |
echo "TAG=$DATE" >> $GITHUB_ENV | |
- name: Upload release | |
uses: ncipollo/[email protected] | |
with: | |
artifacts: "assets/*.apk" | |
allowUpdates: true | |
name: "OneDesign" | |
tag: "CI_${{ env.TAG }}" | |
body: | | |
### Note: | |
use OneDesign with [LSPosed](https://github.com/LSPosed/LSPosed/releases) | |
### CHANGELOG | |
### 更新日志 |