From 34e59bb2eac5c53220e6f4dd6d3d45c6b1a99d84 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 1 Nov 2023 18:17:29 +0900 Subject: [PATCH 1/3] Use latest from ruby-version --- .github/workflows/test.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dc7787d..adbe583 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,20 +44,13 @@ jobs: - name: Run test run: rake # Attempting without 'bundle exec' continue-on-error: ${{matrix.ruby == 'truffleruby-head'}} - - name: Select the latest ruby release - id: latest - run: | - printenv versions | jq -r '[.[] | select(test("^[0-9]"))] | "version="+max' >> $GITHUB_OUTPUT - env: - versions: ${{needs.ruby-versions.outputs.versions}} - shell: sh - id: build run: | rake build echo "pkg=${GITHUB_REPOSITORY#*/}-${RUNNING_OS%-*}" >> $GITHUB_OUTPUT env: RUNNING_OS: ${{matrix.os}} - if: ${{matrix.ruby == steps.latest.outputs.version}} + if: ${{matrix.ruby == needs.ruby-versions.outputs.latest}} shell: bash - name: Upload package uses: actions/upload-artifact@v3 From f050ffb27186d12baf2d4007051a0140689c8233 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 1 Nov 2023 18:45:53 +0900 Subject: [PATCH 2/3] Try build on JRuby --- .github/workflows/test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index adbe583..009c132 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,10 +47,11 @@ jobs: - id: build run: | rake build - echo "pkg=${GITHUB_REPOSITORY#*/}-${RUNNING_OS%-*}" >> $GITHUB_OUTPUT + echo "pkg=${GITHUB_REPOSITORY#*/}-${PLATFORM:-${RUNNING_OS%-*}}" >> $GITHUB_OUTPUT env: RUNNING_OS: ${{matrix.os}} - if: ${{matrix.ruby == needs.ruby-versions.outputs.latest}} + PLATFORM: ${{ startsWith(matrix.ruby, 'jruby') && 'java' || '' }} + if: ${{ matrix.ruby == needs.ruby-versions.outputs.latest || matrix.ruby == 'jruby-head' }} shell: bash - name: Upload package uses: actions/upload-artifact@v3 From aa9e79175b70769cf0c0ba97732bfc52af6f6aac Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 7 Dec 2023 19:32:30 +0900 Subject: [PATCH 3/3] Build only when push --- .github/workflows/test.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 009c132..70bd4c5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,7 +51,11 @@ jobs: env: RUNNING_OS: ${{matrix.os}} PLATFORM: ${{ startsWith(matrix.ruby, 'jruby') && 'java' || '' }} - if: ${{ matrix.ruby == needs.ruby-versions.outputs.latest || matrix.ruby == 'jruby-head' }} + if: >- + ${{ + github.event_name == 'push' && + (matrix.ruby == needs.ruby-versions.outputs.latest || matrix.ruby == 'jruby-head') + }} shell: bash - name: Upload package uses: actions/upload-artifact@v3