Skip to content

Commit

Permalink
chore: Update Github actions to latest (checkout, java) (#92)
Browse files Browse the repository at this point in the history
* chore: Github actions update to latest (checkout, java)

Signed-off-by: Eleftherios Chrysochoidis <lefterisxris@gmail.com>

* chore: Github build action update to latest (checkout, java)

Signed-off-by: Eleftherios Chrysochoidis <lefterisxris@gmail.com>

---------

Signed-off-by: Eleftherios Chrysochoidis <lefterisxris@gmail.com>
  • Loading branch information
LefterisXris authored Nov 28, 2023
1 parent c8aa6fe commit bd7b39f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ jobs:

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

# Validate wrapper
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1.0.4
uses: gradle/wrapper-validation-action@v1.1.0

# Setup Java 17 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
Expand Down Expand Up @@ -72,19 +72,19 @@ jobs:
# Run tests
- name: Run Tests
run: ./gradlew test
run: ./gradlew check

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

# Cache Plugin Verifier IDEs
- name: Setup Plugin Verifier IDEs Cache
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides
key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}
Expand All @@ -96,7 +96,7 @@ jobs:
# Collect Plugin Verifier Result
- name: Collect Plugin Verifier Result
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: pluginVerifier-result
path: ${{ github.workspace }}/build/reports/pluginVerifier
Expand Down Expand Up @@ -126,15 +126,15 @@ jobs:
# Prepare a draft release for GitHub Releases page for the manual verification
# If accepted and published, release workflow would be triggered
releaseDraft:
name: Release Draft
name: Release draft
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
steps:

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

# Remove old release drafts by using the curl request for the available releases with draft flag
- name: Remove Old Release Drafts
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:

# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v2.4.0
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}

# Setup Java 11 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
Expand Down Expand Up @@ -72,6 +72,7 @@ jobs:
run: |
VERSION="${{ github.event.release.tag_name }}"
BRANCH="changelog-update-$VERSION"
LABEL="release changelog"
git config user.email "action@github.com"
git config user.name "GitHub Action"
Expand All @@ -80,8 +81,13 @@ jobs:
git commit -am "Changelog update - $VERSION"
git push --set-upstream origin $BRANCH
gh label create "$LABEL" \
--description "Pull requests with release changelog update" \
--force \
|| true
gh pr create \
--title "Changelog update - \`$VERSION\`" \
--body "Current pull request contains patched \`CHANGELOG.md\` file for the \`$VERSION\` version." \
--base main \
--label "$LABEL" \
--head $BRANCH

0 comments on commit bd7b39f

Please # to comment.