Release v0.1.2 #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Package | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: release-package-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| package-and-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build package | |
| run: npm run build | |
| - name: Pack npm tarball | |
| run: npm pack | |
| - name: Upload npm tarball artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: npm-package-release | |
| path: ui-test-*.tgz | |
| if-no-files-found: error | |
| - name: Publish tarball to GitHub Release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| TAG_NAME="${GITHUB_REF_NAME}" | |
| TARBALL="$(ls ui-test-*.tgz)" | |
| if gh release view "$TAG_NAME" >/dev/null 2>&1; then | |
| echo "Release $TAG_NAME already exists" | |
| else | |
| gh release create "$TAG_NAME" \ | |
| --title "$TAG_NAME" \ | |
| --generate-notes | |
| fi | |
| gh release upload "$TAG_NAME" "$TARBALL" --clobber |