mirror of
				https://github.com/yeslayla/cognito-oauthtools.git
				synced 2025-11-04 12:03:07 +01:00 
			
		
		
		
	Intergrate with semver action
This commit is contained in:
		
							
								
								
									
										10
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							@ -14,12 +14,10 @@ jobs:
 | 
				
			|||||||
      with:
 | 
					      with:
 | 
				
			||||||
        python-version: 3.7
 | 
					        python-version: 3.7
 | 
				
			||||||
    - name: Update Version
 | 
					    - name: Update Version
 | 
				
			||||||
      run: |
 | 
					      id: semver
 | 
				
			||||||
        pip install bumpversion
 | 
					      uses: RightBrain-Networks/semver-action@1.0.0
 | 
				
			||||||
        export regex="([0-9]+.[0-9]+.[0-9]+)"
 | 
					      with:
 | 
				
			||||||
        echo ${{ github.ref }} > tag.txt
 | 
					        mode: get
 | 
				
			||||||
        VERSION=`grep -Po "${regex}" tag.txt`
 | 
					 | 
				
			||||||
        bumpversion minor --no-tag --new-version ${VERSION}
 | 
					 | 
				
			||||||
    - name: Install dependencies
 | 
					    - name: Install dependencies
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        python -m pip install --upgrade pip
 | 
					        python -m pip install --upgrade pip
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										16
									
								
								.github/workflows/version.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								.github/workflows/version.yml
									
									
									
									
										vendored
									
									
								
							@ -8,24 +8,12 @@ on:
 | 
				
			|||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  CheckVersion:
 | 
					  CheckVersion:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    container:
 | 
					 | 
				
			||||||
      image: rightbrainnetworks/auto-semver
 | 
					 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - name: Checkout
 | 
					    - name: Checkout
 | 
				
			||||||
      uses: actions/checkout@v1
 | 
					      uses: actions/checkout@v1
 | 
				
			||||||
    - name: Run auto-semver
 | 
					    - name: Run Auto-Semver
 | 
				
			||||||
      id: semver
 | 
					      id: semver
 | 
				
			||||||
      run: |
 | 
					      uses: RightBrain-Networks/semver-action@1.0.0
 | 
				
			||||||
        export regex='^\\s*current_version\\s*=\\s*\\K[^\\s]+'
 | 
					 | 
				
			||||||
        export RETURN_STATUS=`semver -n`
 | 
					 | 
				
			||||||
        echo "Semver Return Status: ${RETURN_STATUS}"
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
        export SEMVER_NEW_VERSION=`grep -Po '${regex}' .bumpversion.cfg`
 | 
					 | 
				
			||||||
        export VERSION=`semver_get_version -d`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        echo ::set-output name=RETURN_STATUS::$RETURN_STATUS
 | 
					 | 
				
			||||||
        echo ::set-output name=SEMVER_NEW_VERSION::$SEMVER_NEW_VERSION
 | 
					 | 
				
			||||||
        echo ::set-output name=VERSION::$VERSION
 | 
					 | 
				
			||||||
    - name: Create Release
 | 
					    - name: Create Release
 | 
				
			||||||
      id: create_release
 | 
					      id: create_release
 | 
				
			||||||
      uses: actions/create-release@v1
 | 
					      uses: actions/create-release@v1
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user