Giter Site home page Giter Site logo

managedcode / mauiappversion Goto Github PK

View Code? Open in Web Editor NEW
17.0 1.0 1.0 821 KB

This action updates the application version and/or display version properties in a .cproj file for a MAUI application. You can use this action as part of your CI/CD workflow to automatically update the version properties when building and publishing your MAUI application.

License: MIT License

JavaScript 100.00%
bump bumpversion maui version csproj

mauiappversion's Introduction

Update MAUI App Version Action

This action updates the application version and/or display version properties in a .cproj file for a MAUI application. You can use this action as part of your CI/CD workflow to automatically update the version properties when building and publishing your MAUI application.

Inputs

csproj (required)

The path to the .cproj file for your MAUI application.

version

The new value to set for the ApplicationVersion property in the .cproj file. If this input is not provided, the ApplicationVersion property will not be updated.

displayVersion

The new value to set for the ApplicationDisplayVersion property in the .cproj file. If this input is not provided, the ApplicationDisplayVersion property will not be updated.

printFile

Whether to print the contents of the updated .cproj file to the console. Set to true to print the contents of the file, or leave blank to not print the file contents.

Example usage

uses: managedcode/MAUIAppVersion@v1
with:
  csproj: 'path/to/my-project.csproj'
  version: ${{ github.run_number }} # to keep value unique
  displayVersion: '1.0.0'
  printFile: true # optional

This example updates the ApplicationVersion property to 128 and the ApplicationDisplayVersion property to 1.0.0 in the .cproj file located at path/to/my-project.csproj. The contents of the updated .cproj file will be printed to the console.

mauiappversion's People

Contributors

churchs19 avatar ksemenenko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

churchs19

mauiappversion's Issues

Cannot seem to be able to get this to run corrrectly

When I run this, it always prints out the entire csproj file (with the expected changes) even if I do not set "print" to true, and yet it never actually modifies the original file.
So it seems to just be failing gracefully? Or I am missing a step? I even looked at your test cases and didnt notice anything weird that I had not accounted for.

    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Update project file version
        uses: managedcode/MAUIAppVersion@v1
        with:
          csproj: ./Fe.csproj
          version: ${{ github.run_number }} # to keep value unique
          displayVersion: '1.2.3'
  
      - run: git push "https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY.git" --follow-tags

make this auto increment the version number

Hi There-
I have a suggestion for a possible new feature that would be helpful to a lot of devs:

Would it be possible to get this action to have a property to increment the version number and display version number for us by 1

E.G

currently the action has these properties:

uses: managedcode/MAUIAppVersion@v1
with:
csproj: 'path/to/my-project.csproj'
version: ${{ github.run_number }} # to keep value unique
displayVersion: '1.0.0'
printFile: true # optional

add 2 new (optional) properties of :

incrementVersion: true
incrementDisplayVersion: Build

incrementDisplayVersion can have Major / Minor / Build ( these correspond to which part of the version # to increase by one - eg in a display version they map to which position to increase by one in the version # eg 1.2.3 if I put build that is position 3 so version 1.2.3 would become 1.2.4)

incrementVersion: true increases the Version # that is currently in the proj file by 1.

NOTE: when these increment options are specified then you dont need to supply a version or display version to the action as it will read the existing ones and increase them.

so we have:

uses: managedcode/MAUIAppVersion@v1
with:
csproj: 'path/to/my-project.csproj'
version: ${{ github.run_number }} # to keep value unique
displayVersion: '1.0.0'
printFile: true # optional
incrementVersion: true
incrementDisplayVersion: Build

This will increment the current Version # in minor position by 1 and also increase the buildDisplayVersion by 1.

By adding this it will make doing releases of new builds a lot more seamless rather than the dev having to manually work out version numbers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.