Skip to content

Commit 9b77893

Browse files
committed
Take version number from package.json
1 parent 69abea9 commit 9b77893

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

.github/workflows/build_release.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ jobs:
1515
runs-on: ${{ matrix.platform }}
1616

1717
steps:
18-
- run: echo "${{ github.event.release.tag_name }}"
1918
- uses: actions/checkout@v2
2019
with:
2120
ref: ${{ github.event.release.tag_name }}
@@ -25,7 +24,7 @@ jobs:
2524
uses: pchynoweth/action-get-npm-version@master
2625

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

3130
- name: Get current date
@@ -56,7 +55,9 @@ jobs:
5655
- run: npm run setup
5756
- name: Fix lerna mess
5857
run: node ./scripts/fix_lerna_backup.js
59-
- run: OVERRIDE_BUILD_DATE=${{ steps.date.outputs.formattedTime }} npm run build
58+
- run: npm run build
59+
env:
60+
OVERRIDE_BUILD_DATE: '${{ steps.date.outputs.formattedTime }}'
6061
- run: SKIP_HARDWARE_TEST=true npm run test
6162
if: ${{ matrix.platform == 'ubuntu-16.04' }}
6263

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

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

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

0 commit comments

Comments
 (0)