Skip to content

Commit

Permalink
fix(ci): convert TARGET env var into output var
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoomen committed Oct 24, 2020
1 parent 34cdb72 commit cce2d2c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ jobs:
runs-on : ${{ matrix.os }}
env:
NODE_VERSION: 14
TARGET: $(echo $RUNNER_OS | tr '[:upper:]' '[:lower:]')
ASSET_FILENAME: vim-doge-$(echo $RUNNER_OS | tr '[:upper:]' '[:lower:]')
steps:
- name: Get build info
id: build_info
run: |
echo ::set-output name=target::$(echo ${{ runner.os }} | tr '[:upper:]' '[:lower:]')
- name: Checkout kkoomen/vim-doge
uses: actions/checkout@v2
with:
Expand All @@ -25,7 +27,7 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
- run: npm ci --no-save
- name: Build binary
run: npm run build:binary -- node${{ env.NODE_VERSION }}-${{ env.TARGET }}-x64 ${{ env.ASSET_FILENAME }}
run: npm run build:binary -- node${{ env.NODE_VERSION }}-${{ steps.build_info.outputs.target }}-x64 vim-doge-${{ steps.build_info.outputs.target }}
- name: Get release
id: get_release
uses: bruceadams/get-release@v1.2.2
Expand All @@ -34,8 +36,8 @@ jobs:
- name: Get asset info
id: asset_info
run: |
echo ::set-output name=asset_path::./bin/${{ env.ASSET_FILENAME }}.tar.gz
echo ::set-output name=asset_name::${{ env.ASSET_FILENAME }}.tar.gz
echo ::set-output name=asset_path::./bin/vim-doge-${{ steps.build_info.outputs.target }}.tar.gz
echo ::set-output name=asset_name::vim-doge-${{ steps.build_info.outputs.target }}.tar.gz
- name: Upload release asset
uses: actions/upload-release-asset@v1.0.1
env:
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ jobs:
vim-version: [v7.4.2119, head]
node-version: [10, 12, 14]
runs-on: ${{ matrix.os }}
env:
TARGET: $(echo $RUNNER_OS | tr '[:upper:]' '[:lower:]')
steps:
- name: Get build info
id: build_info
run: |
echo ::set-output name=target::$(echo ${{ runner.os }} | tr '[:upper:]' '[:lower:]')
- name: Checkout kkoomen/vim-doge
uses: actions/checkout@v2
with:
Expand All @@ -34,7 +36,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm ci --no-save
- name: Build binary
run: npm run build:binary -- node${{ matrix.node-version }}-${{ env.TARGET }}-x64
run: npm run build:binary -- node${{ matrix.node-version }}-${{ steps.build_info.outputs.target }}-x64
- name: Setup Vim
uses: thinca/action-setup-vim@v1
id: vim
Expand All @@ -52,9 +54,11 @@ jobs:
vim-version: [v0.3.2, head]
node-version: [10, 12, 14]
runs-on: ${{ matrix.os }}
env:
TARGET: $(echo $RUNNER_OS | tr '[:upper:]' '[:lower:]')
steps:
- name: Get build info
id: build_info
run: |
echo ::set-output name=target::$(echo ${{ runner.os }} | tr '[:upper:]' '[:lower:]')
- name: Checkout kkoomen/vim-doge
uses: actions/checkout@v2
with:
Expand All @@ -70,7 +74,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm ci --no-save
- name: Build binary
run: npm run build:binary -- node${{ matrix.node-version }}-${{ env.TARGET }}-x64
run: npm run build:binary -- node${{ matrix.node-version }}-${{ steps.build_info.outputs.target }}-x64
- name: Setup Vim
uses: thinca/action-setup-vim@v1
id: vim
Expand Down

0 comments on commit cce2d2c

Please sign in to comment.