Skip to content

Commit

Permalink
🎉 feat: provenance publish
Browse files Browse the repository at this point in the history
  • Loading branch information
SaltyAom committed Sep 29, 2024
1 parent cdb1522 commit 4c88e86
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
50 changes: 50 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Publish

on:
release:
types: [published]

defaults:
run:
shell: bash

permissions:
id-token: write

env:
# Enable debug logging for actions
ACTIONS_RUNNER_DEBUG: true

jobs:
publish-npm:
name: 'Publish: npm Registry'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4

- name: 'Setup Bun'
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
registry-url: "https://registry.npmjs.org"

- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'

- name: Install packages
run: bun install

- name: Build code
run: bun run build

- name: Test
run: bun run test

- name: 'Publish'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm publish --provenance --access=public
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elysiajs/swagger",
"version": "1.1.2",
"version": "1.1.3",
"description": "Plugin for Elysia to auto-generate Swagger page",
"author": {
"name": "saltyAom",
Expand Down

0 comments on commit 4c88e86

Please sign in to comment.