parent
							
								
									07a75b53f8
								
							
						
					
					
						commit
						b196a86359
					
				
				 2 changed files with 33 additions and 54 deletions
			
			
		@ -0,0 +1,33 @@ | 
				
			||||
name: CI | 
				
			||||
on: | 
				
			||||
  create: # when tags are created | 
				
			||||
  push: | 
				
			||||
    branches: [ master ] | 
				
			||||
  pull_request: | 
				
			||||
    branches: [ master ] | 
				
			||||
jobs: | 
				
			||||
  Build_Windows: | 
				
			||||
    runs-on: windows-latest | 
				
			||||
    steps: | 
				
			||||
    - name: Checkout Repository | 
				
			||||
      uses: actions/checkout@v2 | 
				
			||||
      with: | 
				
			||||
        fetch-depth: 0 | 
				
			||||
 | 
				
			||||
    - name: Install .NET | 
				
			||||
      uses: actions/setup-dotnet@v1 | 
				
			||||
      with: | 
				
			||||
        dotnet-version: 6.0.x | 
				
			||||
    - name: Restore dependencies | 
				
			||||
      run: dotnet restore src | 
				
			||||
    - name: Build Project | 
				
			||||
      run: dotnet build -c Release --no-restore src | 
				
			||||
 | 
				
			||||
    - name: Build Packages | 
				
			||||
      run: dotnet pack src/ImGui.NET -c Release --no-restore --no-build | 
				
			||||
    - name: List Packages | 
				
			||||
      run: ls -l bin\Release\ImGui.NET\ | 
				
			||||
 | 
				
			||||
    - name: Publish to nuget.org | 
				
			||||
      if: startsWith(github.ref, 'refs/tags/') | 
				
			||||
      run: dotnet nuget push bin\Release\ImGui.NET\*.nupkg -s https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_KEY}} | 
				
			||||
@ -1,54 +0,0 @@ | 
				
			||||
name: CI | 
				
			||||
on: | 
				
			||||
  create: # when tags are created | 
				
			||||
  push: | 
				
			||||
    branches: [ master ] | 
				
			||||
  pull_request: | 
				
			||||
    branches: [ master ] | 
				
			||||
jobs: | 
				
			||||
  Build_Windows: | 
				
			||||
    runs-on: windows-latest | 
				
			||||
    steps: | 
				
			||||
    - name: Checkout Repository | 
				
			||||
      uses: actions/checkout@v2 | 
				
			||||
      with: | 
				
			||||
        fetch-depth: 0 | 
				
			||||
 | 
				
			||||
    # create a tag via following command to execute these CI steps | 
				
			||||
    # git tag -a 1.86 -m "Releasing new ImGui.NET Version" | 
				
			||||
    # git push origin 1.86 | 
				
			||||
    - name: Bump up ImGui.NET version | 
				
			||||
      if: startsWith(github.ref, 'refs/tags/') | 
				
			||||
      run: | | 
				
			||||
        sed -i "s/<AssemblyVersion>.*/<AssemblyVersion>${{ github.event.ref }}<\/AssemblyVersion>/g;" src/ImGui.NET/ImGui.NET.csproj | 
				
			||||
        git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | 
				
			||||
        git config --local user.name "github-actions[bot]" | 
				
			||||
        git commit -m "Bump version to ${{ github.event.ref }}" -a | 
				
			||||
      shell: bash | 
				
			||||
    - name: Push changes | 
				
			||||
      if: startsWith(github.ref, 'refs/tags/') | 
				
			||||
      uses: ad-m/github-push-action@master | 
				
			||||
      with: | 
				
			||||
        github_token: ${{ secrets.GITHUB_TOKEN }} | 
				
			||||
        branch: master | 
				
			||||
    ######################################################## | 
				
			||||
 | 
				
			||||
    - name: Install .NET | 
				
			||||
      uses: actions/setup-dotnet@v1 | 
				
			||||
      with: | 
				
			||||
        dotnet-version: 6.0.x | 
				
			||||
    - name: Restore dependencies | 
				
			||||
      run: dotnet restore src | 
				
			||||
    - name: Build Project | 
				
			||||
      run: dotnet build -c Release --no-restore src | 
				
			||||
 | 
				
			||||
    # create a tag via following command to execute these CI steps | 
				
			||||
    # git tag -a 1.86 -m "Releasing new ImGui.NET Version" | 
				
			||||
    # git push origin 1.86 | 
				
			||||
    - name: Build Packages | 
				
			||||
      if: startsWith(github.ref, 'refs/tags/') | 
				
			||||
      run: dotnet pack src/ImGui.NET -c Release --no-restore --no-build | 
				
			||||
    - name: List Packages | 
				
			||||
      if: startsWith(github.ref, 'refs/tags/') | 
				
			||||
      run: ls -l bin\Release\ImGui.NET\ | 
				
			||||
    ######################################################## | 
				
			||||
					Loading…
					
					
				
		Reference in new issue