From b452770322c00091e2d53281359ed9a754832b5e Mon Sep 17 00:00:00 2001 From: machaval Date: Mon, 28 Sep 2020 17:42:51 -0300 Subject: [PATCH] Trying to fix scripts XII --- .github/workflows/main.yml | 21 ++++++++------------- .github/workflows/release.yml | 23 +++++++++-------------- 2 files changed, 17 insertions(+), 27 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ac7afff..1aa3e26 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,6 +17,13 @@ jobs: strategy: matrix: os: [macos-latest, ubuntu-latest, windows-2019] + include: + - os: windows-2019 + script_name: dw.exe + - os: ubuntu-latest + script_name: dw + - os: macos-latest + script_name: dw runs-on: ${{ matrix.os }} # Steps represent a sequence of tasks that will be executed as part of the job @@ -49,21 +56,9 @@ jobs: AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}} AWS_SECRET_KEY: ${{secrets.AWS_SECRET_KEY}} - # Build Artifact that we want to publish for windows - - name: Build artifact name Windows - run: | - echo "::set-env name=artifact::dw.exe" - if: contains(runner.os, 'indows') - - # Build Artifact that we want to publish for other envs - - name: Build artifact name for Linux and Mac - run: | - echo "::set-env name=artifact::dw" - if: !contains(runner.os, 'indows') - # Upload the generated artifact - name: Upload generated script uses: actions/upload-artifact@v2 with: name: dw-${{runner.os}} - path: native-cli/build/graal/${{ env.artifact }} \ No newline at end of file + path: native-cli/build/graal/${{ matrix.script_name }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1d94ade..796a2f3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,8 +12,15 @@ jobs: strategy: matrix: os: [macos-latest, ubuntu-latest, windows-2019] - runs-on: ${{ matrix.os }} + include: + - os: windows-2019 + script_name: dw.exe + - os: ubuntu-latest + script_name: dw + - os: macos-latest + script_name: dw + runs-on: ${{ matrix.os }} # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it @@ -46,18 +53,6 @@ jobs: draft: false prerelease: false - # Build Artifact that we want to publish for windows - - name: Build artifact name Windows - run: | - echo "::set-env name=artifact::dw.exe" - if: contains(runner.os, 'indows') - - # Build Artifact that we want to publish for other envs - - name: Build artifact name for Linux and Mac - run: | - echo "::set-env name=artifact::dw" - if: !contains(runner.os, 'indows') - - name: Artifact version id: artifact_version run: echo "::set-env name=NATIVE_VERSION::$(echo '${{github.ref}}' | sed -e 's,.*/v\(.*\),\1,')" @@ -70,6 +65,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: native-cli/build/graal/${{ env.artifact }} + asset_path: native-cli/build/graal/${{ matrix.script_name }} asset_name: data-weave-${{env.NATIVE_VERSION}}-${{runner.os}} asset_content_type: application/zip