Skip to content

chore(release): 2.6.1 #84

chore(release): 2.6.1

chore(release): 2.6.1 #84

Workflow file for this run

name: Publish
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Create Build
id: build
run: |
bun install --frozen-lockfile
bun run build
- name: Create NPM Release
if: ${{ !contains(github.ref_name, 'beta') }}
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create Beta NPM Release
if: ${{ contains(github.ref_name, 'beta') }}
run: npm publish --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create Archive
run: |
mkdir build
cp -r dist build
cp README.md LICENSE CHANGELOG.md package.json build
cd build
zip -r obsidian-typings-${{ github.ref_name }}.zip .
cd ..
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
build/obsidian-typings-${{ github.ref_name }}.zip
dist/obsidian-typings.api.json
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: ${{ contains(github.ref_name, 'beta') }}