Add draft release functionality back
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Original idea by @ISnackable. Thanks to him for handling the hardest parts!
|
||||
# https://github.com/ISnackable/CercubePlus/blob/main/.github/workflows/Build.yml
|
||||
|
||||
name: Build uYouPlus Artifact
|
||||
name: Build and Release uYouPlus
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -21,7 +21,12 @@ on:
|
||||
default: ""
|
||||
required: true
|
||||
type: string
|
||||
|
||||
create_release:
|
||||
description: "Create a draft release"
|
||||
default: false
|
||||
required: false
|
||||
type: boolean
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
@@ -30,6 +35,8 @@ jobs:
|
||||
build:
|
||||
name: Build uYouPlus
|
||||
runs-on: macos-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout Main
|
||||
@@ -85,8 +92,8 @@ jobs:
|
||||
|
||||
env:
|
||||
THEOS: ${{ github.workspace }}/theos
|
||||
UYOU_VERSION: ${{ github.event.inputs.uyou_version }}
|
||||
YOUTUBE_URL: ${{ github.event.inputs.decrypted_youtube_url }}
|
||||
UYOU_VERSION: ${{ inputs.uyou_version }}
|
||||
YOUTUBE_URL: ${{ inputs.decrypted_youtube_url }}
|
||||
|
||||
- name: Fix compiling && Build Package
|
||||
id: build_package
|
||||
@@ -98,15 +105,42 @@ jobs:
|
||||
echo "::set-output name=package::$(ls -t packages | head -n1)"
|
||||
env:
|
||||
THEOS: ${{ github.workspace }}/theos
|
||||
UYOU_VERSION: ${{ github.event.inputs.uyou_version }}
|
||||
YOUTUBE_VERSION: ${{ github.event.inputs.youtube_version }}
|
||||
UYOU_VERSION: ${{ inputs.uyou_version }}
|
||||
YOUTUBE_VERSION: ${{ inputs.youtube_version }}
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
env:
|
||||
UYOU_VERSION: ${{ github.event.inputs.uyou_version }}
|
||||
YOUTUBE_VERSION: ${{ github.event.inputs.youtube_version }}
|
||||
UYOU_VERSION: ${{ inputs.uyou_version }}
|
||||
YOUTUBE_VERSION: ${{ inputs.youtube_version }}
|
||||
with:
|
||||
name: uYouPlus_${{ env.YOUTUBE_VERSION }}_${{ env.UYOU_VERSION }}
|
||||
path: ${{ github.workspace }}/main/packages/${{ steps.build_package.outputs.package }}
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Create Release
|
||||
if: ${{ inputs.create_release }}
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
UYOU_VERSION: ${{ inputs.uyou_version }}
|
||||
YOUTUBE_VERSION: ${{ inputs.youtube_version }}
|
||||
with:
|
||||
tag_name: v${{ env.YOUTUBE_VERSION }}-${{ env.UYOU_VERSION }}-(${{ github.run_number }})
|
||||
release_name: v${{ env.YOUTUBE_VERSION }}-${{ env.UYOU_VERSION }}-(${{ github.run_number }})
|
||||
draft: true
|
||||
prerelease: false
|
||||
|
||||
- name: Upload Release Asset
|
||||
if: ${{ inputs.create_release }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
UYOU_VERSION: ${{ inputs.uyou_version }}
|
||||
YOUTUBE_VERSION: ${{ inputs.youtube_version }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/main/packages/${{ steps.build_package.outputs.package }}
|
||||
asset_name: uYouPlus_${{ env.YOUTUBE_VERSION }}_${{ env.UYOU_VERSION }}.ipa
|
||||
asset_content_type: application/vnd.debian.binary-package
|
||||
|
||||
Reference in New Issue
Block a user