Skip to content

Commit

Permalink
Merge remote-tracking branch 'share-pro/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Jan 14, 2025
2 parents 02e4f2b + 6b52735 commit 7817e14
Show file tree
Hide file tree
Showing 40 changed files with 2,286 additions and 2,450 deletions.
77 changes: 77 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
version: 2
updates:
# Fetch and update latest `npm` packages
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "00:00"
open-pull-requests-limit: 10
reviewers:
- terwer
assignees:
- terwer
commit-message:
prefix: fix
prefix-development: chore
include: scope
labels:
- "npm dependencies"
- "npm"

# Fetch and update latest `github-actions` pkgs
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
time: "00:00"
open-pull-requests-limit: 10
reviewers:
- terwer
assignees:
- terwer
commit-message:
prefix: fix
prefix-development: chore
include: scope
labels:
- "github actions"
- "ci"

- package-ecosystem: github-actions
directory: "/apps/app"
schedule:
interval: daily
time: "00:00"
open-pull-requests-limit: 10
reviewers:
- terwer
assignees:
- terwer
commit-message:
prefix: fix
prefix-development: chore
include: scope
labels:
- "github actions"
- "ci"
- "app"

- package-ecosystem: github-actions
directory: "/apps/siyuan"
schedule:
interval: daily
time: "00:00"
open-pull-requests-limit: 10
reviewers:
- terwer
assignees:
- terwer
commit-message:
prefix: fix
prefix-development: chore
include: scope
labels:
- "github actions"
- "ci"
- "siyuan"
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI

on:
push:
branches:
- dev

jobs:
build:
name: Build
timeout-minutes: 15
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2

- uses: pnpm/action-setup@v4
with:
version: 9.15.1

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm buildArtifacts

- name: Package
run: pnpm package
96 changes: 96 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
on:
push:
branches:
- main

name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
# Create release
- name: Create release
uses: google-github-actions/release-please-action@v4
id: release
with:
# this assumes that you have created a personal access token
# (PAT) and configured it as a GitHub action secret named
# `GH_TOKEN` (this secret name is not important).
token: ${{ secrets.GH_TOKEN }}
# optional. customize path to release-please-config.json
config-file: release-please-config.json
# optional. customize path to .release-please-manifest.json
manifest-file: .release-please-manifest.json

# Checkout
- name: Checkout
uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}

# Install Node.js
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}

# Install pnpm
- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 9.15.1
run_install: false
if: ${{ steps.release.outputs.release_created }}

# Get pnpm store directory
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
if: ${{ steps.release.outputs.release_created }}

# Setup pnpm cache
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
if: ${{ steps.release.outputs.release_created }}

# Install dependencies
- name: Install dependencies
run: pnpm install
if: ${{ steps.release.outputs.release_created }}

# Prepare new version
# https://github.com/google-github-actions/release-please-action#outputs
- name: Prepare new version
run: |
pnpm prepareRelease
if: ${{ steps.release.outputs.release_created }}

# Build for production
- name: Build for production
run: pnpm buildArtifacts
if: ${{ steps.release.outputs.release_created }}

# Archive package
- name: Archive package
run: pnpm package
if: ${{ steps.release.outputs.release_created }}

# Upload package to release
# https://github.com/philips-labs/terraform-aws-github-runner/blob/main/.github/workflows/release.yml#L46
- name: Upload package.zip to the release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
for f in $(find ./build -name '*.zip'); do
gh release upload ${{ steps.release.outputs.tag_name }} $f
done
if: ${{ steps.release.outputs.releases_created }}
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "5.3.1"
".": "6.0.4"
}
Loading

0 comments on commit 7817e14

Please sign in to comment.