Skip to content

Commit

Permalink
chore: update workflows (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
SirYwell authored Nov 13, 2024
1 parent 95489b2 commit e86af05
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 35 deletions.
44 changes: 18 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ on:
# Trigger the workflow on any pull request
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:

# Prepare environment and build the plugin
Expand All @@ -32,13 +36,13 @@ jobs:
pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }}
steps:

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

# Validate wrapper
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v3.3.2
uses: gradle/actions/wrapper-validation@v3

# Set up Java environment for the next steps
- name: Setup Java
Expand All @@ -49,9 +53,7 @@ jobs:

# Setup Gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-home-cache-cleanup: true
uses: gradle/actions/setup-gradle@v4

# Set environment variables
- name: Export Properties
Expand All @@ -69,8 +71,6 @@ jobs:
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
# Build plugin
- name: Build plugin
run: ./gradlew buildPlugin
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
runs-on: ubuntu-latest
steps:

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

Expand All @@ -113,9 +113,7 @@ jobs:

# Setup Gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-home-cache-cleanup: true
uses: gradle/actions/setup-gradle@v4

# Run tests
- name: Run Tests
Expand Down Expand Up @@ -153,9 +151,12 @@ jobs:
tool-cache: false
large-packages: false

# Check out current repository
# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
fetch-depth: 0 # a full history is required for pull request analysis

# Set up Java environment for the next steps
- name: Setup Java
Expand Down Expand Up @@ -185,7 +186,7 @@ jobs:
tool-cache: false
large-packages: false

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

Expand All @@ -198,9 +199,7 @@ jobs:

# Setup Gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-home-cache-cleanup: true
uses: gradle/actions/setup-gradle@v4

# Cache Plugin Verifier IDEs
- name: Setup Plugin Verifier IDEs Cache
Expand All @@ -211,7 +210,7 @@ jobs:

# Run Verify Plugin task and IntelliJ Plugin Verifier tool
- name: Run Plugin Verification tasks
run: ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
run: ./gradlew verifyPlugin -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}

# Collect Plugin Verifier Result
- name: Collect Plugin Verifier Result
Expand All @@ -232,17 +231,10 @@ jobs:
contents: write
steps:

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

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

# Remove old release drafts by using the curl request for the available releases with a draft flag
- name: Remove Old Release Drafts
env:
Expand All @@ -257,7 +249,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create v${{ needs.build.outputs.version }} \
gh release create "v${{ needs.build.outputs.version }}" \
--draft \
--title "v${{ needs.build.outputs.version }}" \
--notes "$(cat << 'EOM'
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
pull-requests: write
steps:

# Check out current repository
# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4
with:
Expand All @@ -33,9 +33,7 @@ jobs:

# Setup Gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-home-cache-cleanup: true
uses: gradle/actions/setup-gradle@v4

# Set environment variables
- name: Export Properties
Expand All @@ -51,7 +49,7 @@ jobs:
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
# Update Unreleased section with the current release note
# Update the Unreleased section with the current release note
- name: Patch Changelog
if: ${{ steps.properties.outputs.changelog != '' }}
env:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/run-ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

steps:

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

Expand All @@ -44,9 +44,7 @@ jobs:

# Setup Gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-home-cache-cleanup: true
uses: gradle/actions/setup-gradle@v4

# Run IDEA prepared for UI testing
- name: Run IDE
Expand Down

0 comments on commit e86af05

Please sign in to comment.