chore: setup ci workflow
Some checks failed
Publish package / build_and_publish (push) Failing after 19s
Some checks failed
Publish package / build_and_publish (push) Failing after 19s
update workflows update workflows update workflows update workflows update config add cog config
This commit is contained in:
parent
cf0b4011d1
commit
3ed0a30b71
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/eshepelyuk/cocogitto-diya@v1
|
||||
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 }}";
|
||||
Loading…
Add table
Add a link
Reference in a new issue