From 50425cd632ff1dd7940e887e8a552d9eaa643e8a Mon Sep 17 00:00:00 2001 From: Matthew Pope Date: Thu, 3 Oct 2024 21:37:45 -0700 Subject: [PATCH] Remove no-longer-needed concurrency in the workflow --- .github/workflows/build.yml | 67 +++++------------------------------ .github/workflows/pr.yml | 41 ++------------------- .github/workflows/release.yml | 8 ++--- 3 files changed, 15 insertions(+), 101 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9fe0289..fe75acc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,6 @@ # GitHub Action Workflow for building a new commit to the primary repo branch and publishing a new release to beta. # -# Workflow is triggered on pushes into master. +# Workflow is triggered on pushes. Beta publish job runs conditionally if pushed to master. # # Additional Docs: # - GitHub Actions: https://help.github.com/en/actions @@ -17,76 +17,27 @@ jobs: name: Build runs-on: codebuild-ion-intellij-plugin-${{ github.run_id }}-${{ github.run_attempt }}-arm-3.0-large steps: - - # Check out current repository - - name: Fetch Sources - uses: actions/checkout@v2 - - - name: Setup JDK - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v3 with: distribution: 'corretto' java-version: '17' - - uses: gradle/actions/setup-gradle@v4 - - run: df # Build artifact using buildPlugin Gradle task - name: Build Plugin - run: ./gradlew buildPlugin - - - run: df - - name: Get Product Versions - id: get-products - run: | - PRODUCTS="$(./gradlew printProductsReleases -q | jq -cnR '[inputs | select(length > 0)]')" - echo "products=$PRODUCTS" - echo "products=$PRODUCTS" >> "$GITHUB_OUTPUT" - - outputs: - products: ${{ steps.get-products.outputs.products }} - - verify: - runs-on: codebuild-ion-intellij-plugin-${{ github.run_id }}-${{ github.run_attempt }}-arm-3.0-large - needs: build - strategy: - fail-fast: false - matrix: - product: ${{ fromJSON(needs.build.outputs.products) }} - steps: - - run: df - - uses: actions/checkout@v4 - - run: df - - uses: actions/setup-java@v3 - with: - distribution: 'corretto' - java-version: '17' - - run: df + run: ./gradlew build - # Cache Gradle dependencies - - name: Setup Gradle Dependencies Cache - uses: actions/cache@v2 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }} - - # Cache Gradle Wrapper - - name: Setup Gradle Wrapper Cache - uses: actions/cache@v2 - with: - path: ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} - - - run: df - - # Don't set up gradle here. We've already verified the gradle wrapper in the previous job. + # Build artifact using buildPlugin Gradle task + - name: Build Plugin + run: ./gradlew buildPlugin # Run intellij:verifyPlugin task. - name: Verify Plugin - run: ./gradlew verifyPlugin -PverifyPlugin="${{ matrix.product }}" + run: ./gradlew verifyPlugin publish-beta: - needs: verify + needs: build runs-on: codebuild-ion-intellij-plugin-${{ github.run_id }}-${{ github.run_attempt }}-arm-3.0-large if: github.repository == 'amazon-ion/ion-intellij-plugin' steps: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 3a9d735..0f14b10 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -18,20 +18,12 @@ jobs: name: Build runs-on: codebuild-ion-intellij-plugin-${{ github.run_id }}-${{ github.run_attempt }}-arm-3.0-large steps: - - # Check out current repository - - name: Fetch Sources - uses: actions/checkout@v2 - - - name: Setup JDK - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v3 with: distribution: 'corretto' java-version: '17' - - uses: gradle/actions/setup-gradle@v4 - with: - cache-disabled: true # Build artifact using build Gradle task - name: Build @@ -41,33 +33,6 @@ jobs: - name: Build Plugin run: ./gradlew buildPlugin - - name: Get Product Versions - id: get-products - run: | - PRODUCTS="$(./gradlew printProductsReleases -q | jq -cnR '[inputs | select(length > 0)]')" - echo "products=$PRODUCTS" - echo "products=$PRODUCTS" >> "$GITHUB_OUTPUT" - - outputs: - products: ${{ steps.get-products.outputs.products }} - - verify: - runs-on: codebuild-ion-intellij-plugin-${{ github.run_id }}-${{ github.run_attempt }}-arm-3.0-large - needs: build - strategy: - fail-fast: false - matrix: - product: ${{ fromJSON(needs.build.outputs.products) }} - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 - with: - distribution: 'corretto' - java-version: '17' - - uses: gradle/actions/setup-gradle@v4 - with: - cache-read-only: true - # Run intellij:verifyPlugin task. - name: Verify Plugin - run: ./gradlew verifyPlugin -PverifyPlugin="${{ matrix.product }}" + run: ./gradlew verifyPlugin diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9455477..3ae9b99 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,6 @@ # GitHub Action Workflow for releasing a new stable version of the plugin. # -# Workflow is triggered manually w/ proper access. +# Workflow is triggered when a new release is published. # # Additional Docs: # - GitHub Actions: https://help.github.com/en/actions @@ -19,8 +19,7 @@ jobs: runs-on: codebuild-ion-intellij-plugin-${{ github.run_id }}-${{ github.run_attempt }}-arm-3.0-large steps: # Check out current repository - - name: Fetch Sources - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # Generate resources/plugin-changenotes.html - name: Generate Changenotes @@ -34,8 +33,7 @@ jobs: - name: Log Changenotes Content run: cat resources/plugin-changenotes.html - - name: Setup JDK - uses: actions/setup-java@v3 + - uses: actions/setup-java@v3 with: distribution: 'corretto' java-version: '17'