Compare commits
	
		
			3 Commits
		
	
	
		
			v0.1.05-BE
			...
			master
		
	
	| Author | SHA1 | Date | 
|---|---|---|
| 
							
							
								
								 | 
						1f02781d07 | |
| 
							
							
								
								 | 
						01fd73fa1a | |
| 
							
							
								
								 | 
						73e3d4c5be | 
| 
						 | 
					@ -8,7 +8,7 @@ on:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  build:
 | 
					  build:
 | 
				
			||||||
    runs-on: java-latest
 | 
					    runs-on: node-latest
 | 
				
			||||||
    timeout-minutes: 15
 | 
					    timeout-minutes: 15
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,16 @@ jobs:
 | 
				
			||||||
        uses: actions/checkout@v4
 | 
					        uses: actions/checkout@v4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Install dependencies
 | 
					      - name: Install dependencies
 | 
				
			||||||
        run: apt-get update && apt-get install -y jq curl
 | 
					        run: |
 | 
				
			||||||
 | 
					          apt-get update
 | 
				
			||||||
 | 
					          apt-get install -y default-jdk-headless jq curl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Set up JDK 21
 | 
				
			||||||
 | 
					        uses: actions/setup-java@v4
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          distribution: 'temurin'
 | 
				
			||||||
 | 
					          java-version: '21'
 | 
				
			||||||
 | 
					          cache: 'gradle'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Grant execute permission for gradlew
 | 
					      - name: Grant execute permission for gradlew
 | 
				
			||||||
        run: chmod +x gradlew
 | 
					        run: chmod +x gradlew
 | 
				
			||||||
| 
						 | 
					@ -38,22 +47,22 @@ jobs:
 | 
				
			||||||
          JAR_NAME=$(basename "$JAR_PATH")
 | 
					          JAR_NAME=$(basename "$JAR_PATH")
 | 
				
			||||||
          echo "jar_path=$JAR_PATH" >> $GITHUB_OUTPUT
 | 
					          echo "jar_path=$JAR_PATH" >> $GITHUB_OUTPUT
 | 
				
			||||||
          echo "jar_name=$JAR_NAME" >> $GITHUB_OUTPUT
 | 
					          echo "jar_name=$JAR_NAME" >> $GITHUB_OUTPUT
 | 
				
			||||||
          echo "Found JAR: $JAR_NAME"
 | 
					          echo "Found JAR: $JAR_NAME at $JAR_PATH"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Create Release
 | 
					      - name: Create Release
 | 
				
			||||||
        id: create_release
 | 
					        id: create_release
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          TAG_NAME="v${{ steps.version.outputs.mod_version }}"
 | 
					          TAG_NAME="${{ github.ref_name }}"
 | 
				
			||||||
          RELEASE_NAME="Release $TAG_NAME"
 | 
					 | 
				
			||||||
          
 | 
					          
 | 
				
			||||||
          RESPONSE=$(curl -s -X POST \
 | 
					          RESPONSE=$(curl -s -X POST \
 | 
				
			||||||
            -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
 | 
					            -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
 | 
				
			||||||
            -H "Content-Type: application/json" \
 | 
					            -H "Content-Type: application/json" \
 | 
				
			||||||
            -d "{\"tag_name\":\"$TAG_NAME\",\"name\":\"$RELEASE_NAME\",\"draft\":false,\"prerelease\":false}" \
 | 
					            -d "{\"tag_name\":\"$TAG_NAME\",\"name\":\"Release $TAG_NAME\",\"draft\":false,\"prerelease\":false}" \
 | 
				
			||||||
            "https://git.itqop.pw/api/v1/repos/itqop/whitelist-neoforge/releases")
 | 
					            "https://git.itqop.pw/api/v1/repos/itqop/whitelist-neoforge/releases")
 | 
				
			||||||
          
 | 
					          
 | 
				
			||||||
          RELEASE_ID=$(echo "$RESPONSE" | jq -r '.id')
 | 
					          RELEASE_ID=$(echo "$RESPONSE" | jq -r '.id')
 | 
				
			||||||
          echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT
 | 
					          echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT
 | 
				
			||||||
 | 
					          echo "Release ID: $RELEASE_ID"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Upload JAR to Release
 | 
					      - name: Upload JAR to Release
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
| 
						 | 
					@ -61,17 +70,4 @@ jobs:
 | 
				
			||||||
            -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
 | 
					            -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
 | 
				
			||||||
            -F "attachment=@${{ steps.jar.outputs.jar_path }}" \
 | 
					            -F "attachment=@${{ steps.jar.outputs.jar_path }}" \
 | 
				
			||||||
            "https://git.itqop.pw/api/v1/repos/itqop/whitelist-neoforge/releases/${{ steps.create_release.outputs.release_id }}/assets?name=${{ steps.jar.outputs.jar_name }}"
 | 
					            "https://git.itqop.pw/api/v1/repos/itqop/whitelist-neoforge/releases/${{ steps.create_release.outputs.release_id }}/assets?name=${{ steps.jar.outputs.jar_name }}"
 | 
				
			||||||
          echo "✓ JAR uploaded to Release"
 | 
					          echo "✓ JAR uploaded to Release"
 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: Upload to Gitea Package Registry
 | 
					 | 
				
			||||||
        run: |
 | 
					 | 
				
			||||||
          VERSION="${{ steps.version.outputs.mod_version }}"
 | 
					 | 
				
			||||||
          JAR_PATH="${{ steps.jar.outputs.jar_path }}"
 | 
					 | 
				
			||||||
          JAR_NAME="${{ steps.jar.outputs.jar_name }}"
 | 
					 | 
				
			||||||
          
 | 
					 | 
				
			||||||
          curl -s -X PUT \
 | 
					 | 
				
			||||||
            -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
 | 
					 | 
				
			||||||
            -H "Content-Type: application/java-archive" \
 | 
					 | 
				
			||||||
            --data-binary @"$JAR_PATH" \
 | 
					 | 
				
			||||||
            "https://git.itqop.pw/api/packages/itqop/generic/whitelist-neoforge/$VERSION/$JAR_NAME"
 | 
					 | 
				
			||||||
          echo "✓ Package uploaded to Registry"
 | 
					 | 
				
			||||||
		Loading…
	
		Reference in New Issue