Release with Tag #2
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 with Tag | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Tag to create and deploy' | |
required: true | |
permissions: | |
contents: write | |
jobs: | |
create-tag: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Create and push tag | |
uses: rickstaa/action-create-tag@v1 | |
id: tag_create | |
with: | |
tag: ${{ github.event.inputs.tag }} | |
- name: Manually update version and tag in podspec | |
run: | | |
sed -i.bak 's/s.version *= *"[^"]*"/s.version = "${{ github.event.inputs.tag }}"/' AnalyticsSwiftCIO.podspec | |
sed -i.bak 's/:tag => *"[^"]*"/:tag => "${{ github.event.inputs.tag }}"/' AnalyticsSwiftCIO.podspec | |
rm AnalyticsSwiftCIO.podspec.bak | |
- name: Commit and push podspec | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: "Bump podspec version to ${{ github.event.inputs.tag }}" | |
file_pattern: AnalyticsSwiftCIO.podspec | |
- name: Deploy to cocoapoads | |
env: | |
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | |
run: | | |
pod trunk push AnalyticsSwiftCIO.podspec --allow-warnings |