Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to automation update the build version? #82

Open
Isabellakuang opened this issue Sep 13, 2022 · 2 comments
Open

how to automation update the build version? #82

Isabellakuang opened this issue Sep 13, 2022 · 2 comments

Comments

@Isabellakuang
Copy link

we want to use this action to build ios package and successfully. but when we upload the package the response from Testflight said the version need to update. how to automation update the build version?

@dishank-betaflux
Copy link

dishank-betaflux commented Sep 25, 2022

I also was facing this, i suggest do this on your local system. Make a habit to bump up the version before doing any "release" git commit. Just read the pkg most of your doubt might get resolved by itself.
have a look at this pacakge cider pkg

what do i mean by "release" git commit? - well if you are making a commit with the intention to make the build from it and publish. That is a release git commit according to me.

I am open for suggestion. If someone has better idea.

@pnaa
Copy link

pnaa commented Dec 12, 2022

Hello @Isabellakuang

I'm using other actions to achieve this, and it works great.
I use git tags to name the version, and the commit number as build number.

These steps code should be placed before build step, watch out for "fetch-depth: 0"

Check if it makes sense to you!

  - name: Check out Git repository
    uses: actions/checkout@v2
    with:
      fetch-depth: 0

  - name: Extract version from tag
    uses: damienaicheh/[email protected]

  - name: Update Info.plist
    uses: damienaicheh/[email protected]
    with:
      info-plist-path: "ios/YOUR_PROJECT_NAME/Info.plist"
      bundle-version: ${{ env.NUMBER_OF_COMMITS }}
      bundle-short-version-string: "${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}"
      print-file: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants