bump ver #67
This file contains 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 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish-jsr: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Publish package | |
run: npx jsr publish | |
publish-npm: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: denoland/setup-deno@v2 | |
with: | |
deno-version: v2.x # Run with latest stable Deno. | |
- uses: actions/setup-node@v4 | |
with: | |
registry-url: "https://registry.npmjs.org" | |
- uses: actions/checkout@v4 | |
- name: Build for NPM | |
run: deno task build:npm | |
- name: Publish to npm | |
run: | | |
cd dist-npm | |
PACKAGE_NAME=$(node -p "require('./package.json').name") | |
VERSION=$(node -p "require('./package.json').version") | |
if npm view "$PACKAGE_NAME@$VERSION" > /dev/null 2>&1; then | |
echo "Version $VERSION of $PACKAGE_NAME already exists, skipping publish." | |
else | |
echo "Publishing version $VERSION of $PACKAGE_NAME" | |
npm publish --provenance --access public | |
fi | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.FISHBALLPKG_NPM_TOKEN }} |