Skip to content

Commit

Permalink
Take version number from package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
ggodlewski committed Sep 5, 2020
1 parent 69abea9 commit 9b77893
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
runs-on: ${{ matrix.platform }}

steps:
- run: echo "${{ github.event.release.tag_name }}"
- uses: actions/checkout@v2
with:
ref: ${{ github.event.release.tag_name }}
Expand All @@ -25,7 +24,7 @@ jobs:
uses: pchynoweth/action-get-npm-version@master

- name: Validate version
run: echo "Wrong tag"
run: exit
if: ${{ github.event.release.tag_name != format('{0}{1}', 'v', steps.package-version.outputs.version) }}

- name: Get current date
Expand Down Expand Up @@ -56,7 +55,9 @@ jobs:
- run: npm run setup
- name: Fix lerna mess
run: node ./scripts/fix_lerna_backup.js
- run: OVERRIDE_BUILD_DATE=${{ steps.date.outputs.formattedTime }} npm run build
- run: npm run build
env:
OVERRIDE_BUILD_DATE: '${{ steps.date.outputs.formattedTime }}'
- run: SKIP_HARDWARE_TEST=true npm run test
if: ${{ matrix.platform == 'ubuntu-16.04' }}

Expand All @@ -66,8 +67,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ljswitchboard-builder/kipling.3.2.0.${{ steps.date.outputs.formattedTime }}_linux64.tar.gz
asset_name: kipling.3.2.0.${{ steps.date.outputs.formattedTime }}_linux64.tar.gz
asset_path: ljswitchboard-builder/kipling.${{ steps.package-version.outputs.version }}.${{ steps.date.outputs.formattedTime }}_linux64.tar.gz
asset_name: kipling.${{ steps.package-version.outputs.version }}.${{ steps.date.outputs.formattedTime }}_linux64.tar.gz
asset_content_type: application/zip
if: ${{ matrix.platform == 'ubuntu-16.04' }}

Expand All @@ -77,8 +78,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ljswitchboard-builder/kipling.3.2.0.${{ steps.date.outputs.formattedTime }}_win64.zip
asset_name: kipling.3.2.0.${{ steps.date.outputs.formattedTime }}_win64.tar.gz
asset_path: ljswitchboard-builder/kipling.${{ steps.package-version.outputs.version }}.${{ steps.date.outputs.formattedTime }}_win64.zip
asset_name: kipling.${{ steps.package-version.outputs.version }}.${{ steps.date.outputs.formattedTime }}_win64.tar.gz
asset_content_type: application/zip
if: ${{ matrix.platform == 'windows-latest' }}

Expand All @@ -88,7 +89,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ljswitchboard-builder/kipling.3.2.0.${{ steps.date.outputs.formattedTime }}_mac64.zip
asset_name: kipling.3.2.0.${{ steps.date.outputs.formattedTime }}_mac64.tar.gz
asset_path: ljswitchboard-builder/kipling.${{ steps.package-version.outputs.version }}.${{ steps.date.outputs.formattedTime }}_mac64.zip
asset_name: kipling.${{ steps.package-version.outputs.version }}.${{ steps.date.outputs.formattedTime }}_mac64.tar.gz
asset_content_type: application/zip
if: ${{ matrix.platform == 'macos-latest' }}

0 comments on commit 9b77893

Please sign in to comment.