generated from alecodes/base-template
chore: add build step
Some checks failed
Publish package / build_and_publish (push) Failing after 20s
Some checks failed
Publish package / build_and_publish (push) Failing after 20s
This commit is contained in:
parent
8ef4d8408c
commit
74d0f81a6c
3 changed files with 56 additions and 3 deletions
45
.forgejo/workflows/publish.yml
Normal file
45
.forgejo/workflows/publish.yml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
name: Publish package
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
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
|
||||
# Syntax reference: https://forgejo.org/docs/latest/user/actions/
|
||||
jobs:
|
||||
build_and_publish:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Cache Bun dependencies
|
||||
id: cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.bun/install/cache
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-bun-
|
||||
|
||||
- name: Setup Bun
|
||||
id: "setup_bun"
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: "bun install --production"
|
||||
|
||||
- name: Bump version and publish
|
||||
uses: https://github.com/cocogitto/cocogitto-action@v3.10
|
||||
env:
|
||||
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_TOKEN_FORGEJO }}
|
||||
with:
|
||||
release: true
|
||||
check-latest-tag-only: true
|
||||
git-user: 'Cog Bot'
|
||||
git-user-email: 'cog@alecodes.page'
|
||||
8
cog.toml
8
cog.toml
|
|
@ -7,8 +7,12 @@ generate_mono_repository_package_tags = true
|
|||
branch_whitelist = []
|
||||
skip_ci = "[skip ci]"
|
||||
skip_untracked = false
|
||||
pre_bump_hooks = []
|
||||
post_bump_hooks = []
|
||||
pre_bump_hooks = [
|
||||
"echo 'bump package to {{version}}'",
|
||||
"sed -E -i 's/(\"version\":) \"[0-9.]{5}\"/\\1 \"{{version}}\"/gi' package.json",
|
||||
"bun run ci:publish",
|
||||
]
|
||||
post_bump_hooks = ["git push", "git push origin {{version_tag}}"]
|
||||
pre_package_bump_hooks = []
|
||||
post_package_bump_hooks = []
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
{
|
||||
"name": "bun-static-plugin",
|
||||
"name": "@alecodes/bun-static-builder",
|
||||
"version": "0.0.0",
|
||||
"module": "src/index.ts",
|
||||
"bin": "src/cli.ts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"ci:publish": "bun publish --production --frozen-lockfile --silent"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@mini-strap/core": "^0.1.2",
|
||||
"@types/bun": "latest",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue