Skip to content

Commit

Permalink
fix: fixed workflow to properly update version (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
Subhash703 authored Nov 8, 2024
1 parent 62a27ad commit 87b3b8e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ jobs:
git config --local user.name 'hyper-sdk-app[bot]'
git config --local user.email '163947841+hyper-sdk-app[bot]@users.noreply.github.com'
- name: Stash changes
run: git reset --hard

- name: Update version in pubspec.yaml
run: |
# Update the version in pubspec.yaml
Expand All @@ -101,22 +105,25 @@ jobs:
git add pubspec.yaml
git add ios/hypersdkflutter.podspec
git commit -m "chore: bump version to ${{ env.new_version }}"
git push origin main
shell: bash

- name: Stash changes
run: git reset --hard
- name: Publish to pub.dev
uses: k-paxian/[email protected]
with:
credentialJson: ${{ secrets.PUB_PUBLISH_TOKEN }}
flutter: true
skipTests: true

- name: Tag the new version
- name: Create tag for new version
run: |
git tag "v${{ env.new_version }}"
git push origin "v${{ env.new_version }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to pub.dev
uses: k-paxian/[email protected]
with:
credentialJson: ${{ secrets.PUB_PUBLISH_TOKEN }}
flutter: true
skipTests: true
- name: Push release commit
run: |
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
2 changes: 1 addition & 1 deletion ios/hypersdkflutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ puts ("HyperSDK HyperSDK Version Version: #{hyper_sdk_version}")

Pod::Spec.new do |s|
s.name = 'hypersdkflutter'
s.version = '4.0.23'
s.version = '4.0.22'
s.summary = 'Flutter plugin for Juspay SDK'
s.description = <<-DESC
Flutter plugin for juspay SDK.
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: hypersdkflutter
description: >-
Flutter plugin for HyperSDK which enables payment orchestration via different dynamic modules.
version: 4.0.23
version: 4.0.22
repository: https://github.com/juspay/hyper-sdk-flutter
homepage: https://juspay.in/

Expand Down

0 comments on commit 87b3b8e

Please sign in to comment.