Skip to content

Commit

Permalink
🎉 exp: ci publish
Browse files Browse the repository at this point in the history
SaltyAom committed Sep 5, 2024
1 parent bc0f7be commit 0b9a54f
Showing 2 changed files with 63 additions and 2 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Publish Experimental

on:
release:
types: [published]

defaults:
run:
shell: bash

env:
# Enable debug logging for actions
ACTIONS_RUNNER_DEBUG: true

jobs:
changelog:
name: 'Generate Changelog'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Generate Changelog
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bunx changelogithub --no-group
continue-on-error: true

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"

- 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 --access=public
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elysiajs/static",
"version": "1.1.0",
"version": "1.1.1",
"license": "MIT",
"scripts": {
"dev": "bun run --hot example/index.ts",
@@ -51,4 +51,4 @@
"bugs": "https://github.com/elysiajs/elysia-static/issues",
"description": "Plugin for Elysia for serving static folder",
"homepage": "https://github.com/elysiajs/elysia-static"
}
}

0 comments on commit 0b9a54f

Please sign in to comment.