Split up actions (#129)
* Refactor conditional dependent jobs into separate actions * Fix incorrect usage of pull_request_target * Fix Dependabot not merging due to labels being absent when issue is created * Prettify supported version listing
This commit is contained in:
		
							
								
								
									
										44
									
								
								.github/workflows/draft_release.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								.github/workflows/draft_release.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,44 @@
 | 
			
		||||
name: Draft Github Release
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  workflow_run:
 | 
			
		||||
    workflows: [ "OpenInv CI" ]
 | 
			
		||||
    types: [ completed ]
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  draft_release:
 | 
			
		||||
    if: "github.event.workflow_run.event == 'push'
 | 
			
		||||
      && github.event.workflow_run.conclusion == 'success'
 | 
			
		||||
      && startsWith(github.event.workflow_run.event.push.ref, 'refs/tags/')"
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      # Fetch all history - used to assemble changelog.
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
        with:
 | 
			
		||||
          fetch-depth: 0
 | 
			
		||||
 | 
			
		||||
      - name: Set Release Variables
 | 
			
		||||
        run: bash ./scripts/set_release_env.sh
 | 
			
		||||
 | 
			
		||||
      - name: Download Artifact
 | 
			
		||||
        # Unfortunately actions/download-artifact cannot fetch from other workflow runs.
 | 
			
		||||
        uses: dawidd6/action-download-artifact@v2.26.0
 | 
			
		||||
        with:
 | 
			
		||||
          name: dist
 | 
			
		||||
          path: dist
 | 
			
		||||
          run_id: "${{ github.event.workflow_run.id }}"
 | 
			
		||||
          run_number: "${{ github.event.workflow_run.run_number }}"
 | 
			
		||||
          # Searching for a specific run ID that we know was successful, unset 'success' default.
 | 
			
		||||
          workflow_conclusion: ""
 | 
			
		||||
 | 
			
		||||
      - name: Create Release
 | 
			
		||||
        id: create-release
 | 
			
		||||
        uses: softprops/action-gh-release@v0.1.15
 | 
			
		||||
        env:
 | 
			
		||||
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | 
			
		||||
        with:
 | 
			
		||||
          name: ${{ env.VERSIONED_NAME }}
 | 
			
		||||
          body: ${{ env.GENERATED_CHANGELOG }}
 | 
			
		||||
          draft: true
 | 
			
		||||
          prerelease: false
 | 
			
		||||
          files: ./dist/OpenInv.jar
 | 
			
		||||
		Reference in New Issue
	
	Block a user