Skip to content

Commit

Permalink
Trying to fix scripts XII
Browse files Browse the repository at this point in the history
  • Loading branch information
machaval committed Sep 28, 2020
1 parent a7d0201 commit b452770
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 27 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
path: native-cli/build/graal/${{ matrix.script_name }}
23 changes: 9 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,')"
Expand All @@ -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

0 comments on commit b452770

Please sign in to comment.