diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c4c6e0b0..0dddaf7c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,9 +12,24 @@ jobs: uses: actions/checkout@master with: fetch-depth: '0' - # - name: Build project - # run: | - # zip --junk-paths docs JOURNAL.md ./examples/* + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: npm build + run: | + npm ci + npm run build --if-present + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CI: true + + - name: Build project zip + run: | + zip -r dist ./dist/* + - name: Bump version and push tag id: tag_release uses: anothrNick/github-tag-action@1.17.2 @@ -34,13 +49,13 @@ jobs: draft: false prerelease: false - # - name: Upload Release Asset - # id: upload-release-asset - # uses: actions/upload-release-asset@v1 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # with: - # upload_url: ${{ steps.create_release.outputs.upload_url }} - # asset_path: ./docs.zip - # asset_name: docs.zip - # asset_content_type: application/zip + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./dist.zip + asset_name: dist.zip + asset_content_type: application/zip