Skip to content

Commit

Permalink
chore(build): fix package artifact path var name
Browse files Browse the repository at this point in the history
  • Loading branch information
Rayat Rahman committed Apr 4, 2022
1 parent a6c04be commit 6da6220
Showing 1 changed file with 39 additions and 22 deletions.
61 changes: 39 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest]
asset-path: [./out/make/zip/win32/x64/]
asset-path: [./out/make/zip/win32/x64]
asset-filename: [Browseratops-win32-x64-]
optional: [false]
include:
include:
- os: macos-10.15
optional: true
runs-on: ${{ matrix.os }}
Expand All @@ -25,42 +25,59 @@ jobs:
cache: 'npm'
- name: Setup Environment POSIX
if: runner.os != 'Windows'
run: node -e "console.log('PACKAGE_VERSION=' + require('./package.json').version + '\nPACKAGE_NAME=' + require('./package.json').name + '-' + require('./package.json').version)" >> $GITHUB_ENV
run:
node -e "console.log('PACKAGE_VERSION=' +
require('./package.json').version + '\nPACKAGE_NAME=' +
require('./package.json').name + '-' +
require('./package.json').version)" >> $GITHUB_ENV
- name: Setup Environment Windows
if: runner.os == 'Windows'
run: node -e "console.log('PACKAGE_VERSION=' + require('./package.json').version + '\nPACKAGE_NAME=' + require('./package.json').name + '-' + require('./package.json').version)" >> $env:GITHUB_ENV
run:
node -e "console.log('PACKAGE_VERSION=' +
require('./package.json').version + '\nPACKAGE_NAME=' +
require('./package.json').name + '-' +
require('./package.json').version)" >> $env:GITHUB_ENV
- name: Verify versions
run: node -e "if ('refs/tags/v' + '${{ env.PACKAGE_VERSION }}' !== '${{ github.ref }}') { console.log('::error' + 'Version Mismatch. refs/tags/v' + '${{ env.PACKAGE_VERSION }}', '${{ github.ref }}'); throw Error('Version Mismatch. pgk' + '${{ env.PACKAGE_VERSION }}' + ' refs/tags/v' + '${{ github.ref }}')} "
run:
node -e "if ('refs/tags/v' + '${{ env.PACKAGE_VERSION }}' !== '${{
github.ref }}') { console.log('::error' + 'Version Mismatch.
refs/tags/v' + '${{ env.PACKAGE_VERSION }}', '${{ github.ref }}');
throw Error('Version Mismatch. pgk' + '${{ env.PACKAGE_VERSION }}' + '
refs/tags/v' + '${{ github.ref }}')} "
- run: npm ci --audit false
- run: npm run lint
# - run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
- run: npm run typecheck
- run: npm run test
- run: npm run package
# - name: Generate Changelog
# id: changelog
# uses: mindsers/changelog-reader-action@v2
# with:
# version: ${{ env.PACKAGE_VERSION }}
# path: ./CHANGELOG.md
# - name: Generate Changelog
# id: changelog
# uses: mindsers/changelog-reader-action@v2
# with:
# version: ${{ env.PACKAGE_VERSION }}
# path: ./CHANGELOG.md
- name: Create GitHub release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: v${{ env.PACKAGE_VERSION }}
# body: ${{ steps.changelog.outputs.changes }}
draft: false
prerelease: true
tag_name: ${{ github.ref }}
release_name: v${{ env.PACKAGE_VERSION }}
# body: ${{ steps.changelog.outputs.changes }}
draft: false
prerelease: true
- name: Upload GitHub release
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ matrix.asset-path }}/${{ matrix.asset-filename}}${{ env.PACKAGE_VERSION }}.zip
asset_name: ${{ matrix.asset-path }}/${{ matrix.asset-filename}}${{ env.PACKAGE_VERSION }}.zip
asset_content_type: application/zip
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path:
${{ matrix.asset-path }}/${{ matrix.asset-filename}}${{
env.PACKAGE_VERSION }}.zip
asset_name:
${{ matrix.asset-path }}/${{ matrix.asset-filename}}${{
env.PACKAGE_VERSION }}.zip
asset_content_type: application/zip

0 comments on commit 6da6220

Please sign in to comment.