chore: setup ci workflow
Some checks failed
Publish package / build_and_publish (push) Failing after 18s
Some checks failed
Publish package / build_and_publish (push) Failing after 18s
update workflows update workflows update workflows update workflows update config add cog config
This commit is contained in:
parent
cf0b4011d1
commit
d2dee4d1ef
8 changed files with 107 additions and 10 deletions
48
.forgejo/workflows/publish.yaml
Normal file
48
.forgejo/workflows/publish.yaml
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
name: Publish package
|
||||
on:
|
||||
push:
|
||||
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: Setup Cog
|
||||
uses: https://github.com/oknozor/cocogitto-action@v3
|
||||
with:
|
||||
release: false
|
||||
git-user: 'Cog Bot'
|
||||
git-user-email: 'cog@alecodes.page'
|
||||
|
||||
- name: Create release
|
||||
env:
|
||||
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_TOKEN_FORGEJO }}
|
||||
run: "cog bump --auto --hook-profile ${{ 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 }}";
|
||||
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
4
bunfig.toml
Normal file
4
bunfig.toml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[install.scopes]
|
||||
|
||||
"@alecodes" = { token = "$NPM_REGISTRY_TOKEN", url = "https://git.alecodes.page/api/packages/alecodes/npm/" }
|
||||
"@mini-strap" = { token = "$NPM_REGISTRY_TOKEN", url = "https://git.alecodes.page/api/packages/alecodes/npm/" }
|
||||
32
cog.toml
Normal file
32
cog.toml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
from_latest_tag = true
|
||||
ignore_merge_commits = false
|
||||
disable_changelog = false
|
||||
disable_bump_commit = false
|
||||
tag_prefix = "v"
|
||||
generate_mono_repository_global_tag = true
|
||||
branch_whitelist = []
|
||||
skip_ci = "[skip ci]"
|
||||
skip_untracked = false
|
||||
pre_bump_hooks = []
|
||||
post_bump_hooks = []
|
||||
pre_package_bump_hooks = [
|
||||
"echo 'bump package {{package}} to {{version}}'",
|
||||
"sed -E -i 's/(\"version\":) \"[0-9.]{5}\"/\\1 \"{{version}}\"/gi' package.json",
|
||||
"bun run ci:publish",
|
||||
]
|
||||
post_package_bump_hooks = []
|
||||
|
||||
[git_hooks]
|
||||
|
||||
[commit_types]
|
||||
|
||||
[changelog]
|
||||
path = "CHANGELOG.md"
|
||||
authors = []
|
||||
|
||||
[bump_profiles]
|
||||
|
||||
[packages]
|
||||
"@mini-strap/core" = { path = "packages/core" }
|
||||
"@mini-strap/components" = { path = "packages/components" }
|
||||
"@mini-strap/website" = { path = "packages/website", public_api = false }
|
||||
12
package.json
12
package.json
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"name": "mini-strap",
|
||||
"name": "@alecodes/mini-strap",
|
||||
"version": "0.0.1",
|
||||
"module": "index.ts",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.10.0",
|
||||
"@types/bun": "latest",
|
||||
|
|
@ -14,8 +16,12 @@
|
|||
"typescript": "^5.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "bun --filter '*' dev"
|
||||
"dev": "bun --filter '*' dev",
|
||||
"ci:publish": "bun --filter '**/core' ci:publish",
|
||||
"bump": "cog bump --auto --skip-untracked"
|
||||
},
|
||||
"type": "module",
|
||||
"workspaces": ["packages/*"]
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
{
|
||||
"name": "mini-strap-components",
|
||||
"name": "@mini-strap/components",
|
||||
"version": "0.0.1",
|
||||
"module": "src/components.scss",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"ci:publish": "bun publish --production --frozen-lockfile"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bun": "latest"
|
||||
},
|
||||
|
|
@ -9,4 +13,3 @@
|
|||
"typescript": "^5.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
{
|
||||
"name": "mini-strap-core",
|
||||
"name": "@mini-strap/core",
|
||||
"version": "0.0.1",
|
||||
"module": "src/style.scss",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"ci:publish": "bun publish --production --frozen-lockfile --silent"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bun": "latest"
|
||||
},
|
||||
|
|
@ -9,4 +13,3 @@
|
|||
"typescript": "^5.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
{
|
||||
"name": "mini-strap-website",
|
||||
"name": "@mini-strap/website",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite --port 3000",
|
||||
"build": "tsc && vite build",
|
||||
"preview": "vite preview"
|
||||
"preview": "vite preview",
|
||||
"ci:publish": "echo 'no publish workflow defined to this package...'"
|
||||
},
|
||||
"devDependencies": {
|
||||
"sass-embedded": "^1.78.0",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue