Skip to content

Commit

Permalink
ci: action添加cocoapods beta的手动发布workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
CaicaiNo committed Nov 8, 2021
1 parent 874b28d commit 0e4ebf6
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Cocoapods
name: Cocoapods
on:
release:
types: [published]
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/cocoapods_beta_manual.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit 0e4ebf6

Please sign in to comment.