mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 01:40:46 +08:00
chore: add OTA workflow
This commit is contained in:
38
.github/workflows/release-ota.yml
vendored
Normal file
38
.github/workflows/release-ota.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: release-ota
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
limit:
|
||||
description: 'Number of releases to fetch, 2 at least'
|
||||
required: false
|
||||
default: 21
|
||||
type: number
|
||||
|
||||
jobs:
|
||||
make-ota:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: "Build OTA"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
mkdir -pv build-ota && cd build-ota
|
||||
../tools/OTAPacker/build.sh 'MaaAssistantArknights/MaaAssistantArknights' ${{ inputs.limit }}
|
||||
- name: "Set tag"
|
||||
id: set_tag
|
||||
run: |
|
||||
echo "release_tag=$(head -n 1 build-ota/releases)" >> $GITHUB_ENV
|
||||
- name: "Upload to MaaRelease"
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_name: ${{ format('{0}/{1}', github.repository_owner, 'MaaRelease') }}
|
||||
repo_token: ${{ secrets.MAARELEASE_RELEASE }}
|
||||
file_glob: true
|
||||
file: build-ota/*.zip
|
||||
tag: ${{ env.release_tag }}
|
||||
overwrite: true
|
||||
|
||||
Reference in New Issue
Block a user