Skip to content

Commit

Permalink
Fucking
Browse files Browse the repository at this point in the history
  • Loading branch information
bitjerry committed Nov 21, 2023
1 parent e8057fc commit 13b4a27
Showing 1 changed file with 99 additions and 87 deletions.
186 changes: 99 additions & 87 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,82 +93,82 @@ jobs:
name: ${{ steps.artifact.outputs.filename }}
path: ./build/distributions/content/*/*

# Run tests and upload a code coverage report
test:
name: Test
needs: [ build ]
runs-on: ubuntu-latest
steps:

# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v4

# Set up Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11

# Setup Gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true

# Run tests
- name: Run Tests
run: ./gradlew check

# Collect Tests Result of failed tests
- name: Collect Tests Result
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: tests-result
path: ${{ github.workspace }}/build/reports/tests

# Upload the Kover report to CodeCov
- name: Upload Code Coverage Report
uses: codecov/codecov-action@v3
with:
files: ${{ github.workspace }}/build/reports/kover/report.xml

# Run Qodana inspections and provide report
inspectCode:
name: Inspect code
needs: [ build ]
runs-on: ubuntu-latest
permissions:
contents: write
checks: write
pull-requests: write
steps:

# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
large-packages: false

# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v4

# Set up Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11

# Run Qodana inspections
- name: Qodana - Code Inspection
uses: JetBrains/qodana-action@v2023.2.6
with:
cache-default-branch-only: true
# # Run tests and upload a code coverage report
# test:
# name: Test
# needs: [ build ]
# runs-on: ubuntu-latest
# steps:
#
# # Check out current repository
# - name: Fetch Sources
# uses: actions/checkout@v4
#
# # Set up Java environment for the next steps
# - name: Setup Java
# uses: actions/setup-java@v3
# with:
# distribution: zulu
# java-version: 11
#
# # Setup Gradle
# - name: Setup Gradle
# uses: gradle/gradle-build-action@v2
# with:
# gradle-home-cache-cleanup: true
#
# # Run tests
# - name: Run Tests
# run: ./gradlew check
#
# # Collect Tests Result of failed tests
# - name: Collect Tests Result
# if: ${{ failure() }}
# uses: actions/upload-artifact@v3
# with:
# name: tests-result
# path: ${{ github.workspace }}/build/reports/tests
#
# # Upload the Kover report to CodeCov
# - name: Upload Code Coverage Report
# uses: codecov/codecov-action@v3
# with:
# files: ${{ github.workspace }}/build/reports/kover/report.xml
#
# # Run Qodana inspections and provide report
# inspectCode:
# name: Inspect code
# needs: [ build ]
# runs-on: ubuntu-latest
# permissions:
# contents: write
# checks: write
# pull-requests: write
# steps:
#
# # Free GitHub Actions Environment Disk Space
# - name: Maximize Build Space
# uses: jlumbroso/free-disk-space@main
# with:
# tool-cache: false
# large-packages: false
#
# # Check out current repository
# - name: Fetch Sources
# uses: actions/checkout@v4
#
# # Set up Java environment for the next steps
# - name: Setup Java
# uses: actions/setup-java@v3
# with:
# distribution: zulu
# java-version: 11
#
# # Run Qodana inspections
# - name: Qodana - Code Inspection
# uses: JetBrains/qodana-action@v2023.2.6
# with:
# cache-default-branch-only: true

# Run plugin structure verification along with IntelliJ Plugin Verifier
verify:
Expand Down Expand Up @@ -252,16 +252,28 @@ jobs:
| xargs -I '{}' gh api -X DELETE repos/{owner}/{repo}/releases/{}
# Create a new release draft which is not publicly visible and requires manual acceptance
# - name: Create Release Draft
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# gh release create v${{ needs.build.outputs.version }} \
# --draft \
# --title "v${{ needs.build.outputs.version }}" \
# --notes "$(cat << 'EOM'
# ## What's Changed
#
# ${{ needs.build.outputs.changelog }}
# EOM
# )"

- name: Create Release Draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create v${{ needs.build.outputs.version }} \
--draft \
--title "v${{ needs.build.outputs.version }}" \
--notes "$(cat << 'EOM'
## What's Changed
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ needs.build.outputs.version }}
draft: true
body: |
## What's Changed
${{ needs.build.outputs.changelog }}"
${{ needs.build.outputs.changelog }}
EOM
)"
files: ${{ github.workspace }}/build/distributions/content/*/*

0 comments on commit 13b4a27

Please sign in to comment.