update workflows
All checks were successful
Publish package / build_and_publish (push) Successful in 18s
All checks were successful
Publish package / build_and_publish (push) Successful in 18s
This commit is contained in:
parent
f09f5319a7
commit
c7d879c8cc
1 changed files with 13 additions and 5 deletions
|
|
@ -2,6 +2,8 @@ name: Publish package
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
env:
|
||||||
|
NPM_TAG: ${{ github.ref == 'refs/heads/main' && 'latest' || 'next' }}
|
||||||
|
|
||||||
# Variables reference: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#about-contexts
|
# Variables reference: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#about-contexts
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -14,6 +16,7 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Cache Bun dependencies
|
- name: Cache Bun dependencies
|
||||||
|
id: cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.bun/install/cache
|
path: ~/.bun/install/cache
|
||||||
|
|
@ -22,12 +25,17 @@ jobs:
|
||||||
${{ runner.os }}-bun-
|
${{ runner.os }}-bun-
|
||||||
|
|
||||||
- name: Setup Bun
|
- name: Setup Bun
|
||||||
|
id: "setup_bun"
|
||||||
uses: oven-sh/setup-bun@v2
|
uses: oven-sh/setup-bun@v2
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Publish to registry
|
||||||
run: bun install
|
id: "publish"
|
||||||
|
|
||||||
- name: Push to registry
|
|
||||||
env:
|
env:
|
||||||
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_TOKEN_FORGEJO }}
|
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_TOKEN_FORGEJO }}
|
||||||
run: bun publish
|
run: bun publish --production --frozen-lockfile --tag ${{ env.NPM_TAG }}
|
||||||
|
|
||||||
|
- name: Summary
|
||||||
|
run: |
|
||||||
|
echo "Bun executable chache found:\t${{ steps.setup_bun.outputs.cache-hit }}";
|
||||||
|
echo "Bun dependencies chache found:\t${{ steps.cache.outputs.cache-hit }}";
|
||||||
|
echo "Package published:\t${{ steps.publish.outcome }}";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue