Skip to content

Commit

Permalink
added workflow (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahroz16 committed May 26, 2024
1 parent 94e66fb commit 12af8b4
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/tag-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
- name: Install fastlane
run: gem install fastlane

- name: Create and push tag
uses: rickstaa/action-create-tag@v1
id: tag_create
with:
tag: ${{ github.event.inputs.tag }}

- name: Bump version in podspec
run: |
fastlane run version_bump_podspec path:"AnalyticsSwiftCIO.podspec" version_number:"${{ github.event.inputs.tag }}"
- 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

0 comments on commit 12af8b4

Please sign in to comment.