feat: v0.2.8 - history works, chain is validated, all integrity is bu… #26
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: Publish to NPM | |
on: | |
push: | |
tags: | |
- "v*" | |
workflow_dispatch: | |
repository_dispatch: | |
types: | |
- publishhook | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
packages: write | |
pull-requests: write | |
issues: read | |
env: | |
NPM_CONFIG_PROVENANCE: true | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
registry-url: https://registry.npmjs.org/ | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Install dependencies | |
run: pnpm install --no-frozen-lockfile | |
- name: Build JS | |
run: pnpm run lib | |
- name: Build HTML | |
run: pnpm run build | |
- name: Create Release Draft | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: true | |
prerelease: false | |
- name: Upload dist/index.html | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./dist/index.html | |
asset_name: index.html | |
asset_content_type: text/html | |
- name: Upload lib/index.js | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./lib/index.js | |
asset_name: index.js | |
asset_content_type: application/javascript | |
- name: Publish | |
run: npm publish --provenance --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |