From 0e4ebf667a6a09306dd82ce7e8588705cb5ecbe4 Mon Sep 17 00:00:00 2001 From: sheng <277715243@qq.com> Date: Fri, 5 Nov 2021 17:55:39 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20action=E6=B7=BB=E5=8A=A0cocoapods=20beta?= =?UTF-8?q?=E7=9A=84=E6=89=8B=E5=8A=A8=E5=8F=91=E5=B8=83workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflows/{publish.yml => cocoapods.yml} | 2 +- .../{publish_beta.yml => cocoapods_beta.yml} | 2 +- .github/workflows/cocoapods_beta_manual.yml | 34 +++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) rename .github/workflows/{publish.yml => cocoapods.yml} (95%) rename .github/workflows/{publish_beta.yml => cocoapods_beta.yml} (98%) create mode 100644 .github/workflows/cocoapods_beta_manual.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/cocoapods.yml similarity index 95% rename from .github/workflows/publish.yml rename to .github/workflows/cocoapods.yml index e97342e41..24ca43a69 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/cocoapods.yml @@ -1,4 +1,4 @@ -name: Publish Cocoapods +name: Cocoapods on: release: types: [published] diff --git a/.github/workflows/publish_beta.yml b/.github/workflows/cocoapods_beta.yml similarity index 98% rename from .github/workflows/publish_beta.yml rename to .github/workflows/cocoapods_beta.yml index 7286415f2..e19351e4e 100644 --- a/.github/workflows/publish_beta.yml +++ b/.github/workflows/cocoapods_beta.yml @@ -1,6 +1,6 @@ # This is a basic workflow to help you get started with Actions -name: Publish beta +name: Cocoapods beta # Controls when the action will run. Triggers the workflow on push or pull request # events but only for the master branch diff --git a/.github/workflows/cocoapods_beta_manual.yml b/.github/workflows/cocoapods_beta_manual.yml new file mode 100644 index 000000000..05302da17 --- /dev/null +++ b/.github/workflows/cocoapods_beta_manual.yml @@ -0,0 +1,34 @@ +# This is a basic workflow to help you get started with Actions + +name: Cocoapods beta Manual + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: workflow_dispatch + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: macos-latest + # main 分支的发布请走正式流程,手动仅能发布其他分支的beta版本,用于测试 + if: ${{ github.ref != 'refs/heads/master' }} + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - name: Install Cocoapods + run: gem install cocoapods + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Create CocoaPods beta + run: | + set -eo pipefail + pod repo update + chmod +x Scripts/cocoapods-beta.sh + sh Scripts/cocoapods-beta.sh + env: + COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} + GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}