mirror of
https://github.com/logto-io/logto.git
synced 2025-01-27 21:39:16 -05:00
ci: publish workflow (#1342)
This commit is contained in:
parent
496b17b527
commit
d456f5c9a2
18 changed files with 79 additions and 3 deletions
19
.github/workflows/dockerize.yml
vendored
19
.github/workflows/dockerize.yml
vendored
|
@ -2,7 +2,10 @@ name: Dockerize
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches:
|
||||||
|
- master
|
||||||
|
tags:
|
||||||
|
- v*.*.*
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: dockerize-${{ github.ref }}
|
group: dockerize-${{ github.ref }}
|
||||||
|
@ -14,6 +17,17 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v4
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
ghcr.io/logto-io/logto
|
||||||
|
tags: |
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
type=semver,pattern={{major}}
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
@ -29,7 +43,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: ghcr.io/logto-io/logto:latest
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
- name: Compose up
|
- name: Compose up
|
||||||
run: docker compose up -d
|
run: docker compose up -d
|
||||||
|
|
45
.github/workflows/publish.yml
vendored
Normal file
45
.github/workflows/publish.yml
vendored
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
name: Publish
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
semver:
|
||||||
|
description: Semver bump type
|
||||||
|
required: true
|
||||||
|
preid:
|
||||||
|
description: Pre ID
|
||||||
|
required: true
|
||||||
|
default: alpha
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
token: ${{ secrets.BOT_PAT }}
|
||||||
|
|
||||||
|
- name: Setup Node and pnpm
|
||||||
|
uses: silverhand-io/actions-node-pnpm-run-steps@v1.2.2
|
||||||
|
|
||||||
|
- name: Configure Git user
|
||||||
|
run: |
|
||||||
|
git config --global user.email bot@silverhand.io
|
||||||
|
git config --global user.name silverhand-bot
|
||||||
|
|
||||||
|
- name: Publish to GitHub
|
||||||
|
# add `no-verify-access` due to https://github.com/lerna/lerna/issues/2788
|
||||||
|
run: |
|
||||||
|
pnpm -- lerna publish -m "release: %s" --conventional-commits --preid=${{ github.event.inputs.preid }} --no-verify-access --create-release=github --yes ${{ github.event.inputs.semver }}
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.BOT_PAT }}
|
||||||
|
|
||||||
|
- name: Package
|
||||||
|
run: ./package.sh
|
||||||
|
|
||||||
|
- name: Upload tar to GitHub release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
files: /tmp/logto.tar.gz
|
|
@ -6,6 +6,7 @@
|
||||||
"exports": "./lib/index.js",
|
"exports": "./lib/index.js",
|
||||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
"private": true,
|
||||||
"files": [
|
"files": [
|
||||||
"lib",
|
"lib",
|
||||||
"docs",
|
"docs",
|
||||||
|
|
|
@ -6,13 +6,13 @@
|
||||||
"exports": "./lib/index.js",
|
"exports": "./lib/index.js",
|
||||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
"private": true,
|
||||||
"files": [
|
"files": [
|
||||||
"lib",
|
"lib",
|
||||||
"docs",
|
"docs",
|
||||||
"logo.svg",
|
"logo.svg",
|
||||||
"README.md"
|
"README.md"
|
||||||
],
|
],
|
||||||
"private": false,
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"precommit": "lint-staged",
|
"precommit": "lint-staged",
|
||||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json",
|
"build": "rm -rf lib/ && tsc -p tsconfig.build.json",
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
"exports": "./lib/index.js",
|
"exports": "./lib/index.js",
|
||||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
"private": true,
|
||||||
"files": [
|
"files": [
|
||||||
"lib",
|
"lib",
|
||||||
"docs",
|
"docs",
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
"exports": "./lib/index.js",
|
"exports": "./lib/index.js",
|
||||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
"private": true,
|
||||||
"files": [
|
"files": [
|
||||||
"lib",
|
"lib",
|
||||||
"docs",
|
"docs",
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
"exports": "./lib/index.js",
|
"exports": "./lib/index.js",
|
||||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
"private": true,
|
||||||
"files": [
|
"files": [
|
||||||
"lib",
|
"lib",
|
||||||
"docs",
|
"docs",
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
"exports": "./lib/index.js",
|
"exports": "./lib/index.js",
|
||||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
"private": true,
|
||||||
"files": [
|
"files": [
|
||||||
"lib",
|
"lib",
|
||||||
"docs",
|
"docs",
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
"exports": "./lib/index.js",
|
"exports": "./lib/index.js",
|
||||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
"private": true,
|
||||||
"files": [
|
"files": [
|
||||||
"lib",
|
"lib",
|
||||||
"docs",
|
"docs",
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
"exports": "./lib/index.js",
|
"exports": "./lib/index.js",
|
||||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
"private": true,
|
||||||
"files": [
|
"files": [
|
||||||
"lib",
|
"lib",
|
||||||
"docs",
|
"docs",
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
"exports": "./lib/index.js",
|
"exports": "./lib/index.js",
|
||||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
"private": true,
|
||||||
"files": [
|
"files": [
|
||||||
"lib",
|
"lib",
|
||||||
"docs",
|
"docs",
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
"exports": "./lib/index.js",
|
"exports": "./lib/index.js",
|
||||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
"private": true,
|
||||||
"files": [
|
"files": [
|
||||||
"lib",
|
"lib",
|
||||||
"docs",
|
"docs",
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
"exports": "./lib/index.js",
|
"exports": "./lib/index.js",
|
||||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
"private": true,
|
||||||
"files": [
|
"files": [
|
||||||
"lib",
|
"lib",
|
||||||
"docs",
|
"docs",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
"private": true,
|
||||||
"files": [
|
"files": [
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
"exports": "./lib/index.js",
|
"exports": "./lib/index.js",
|
||||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
"private": true,
|
||||||
"files": [
|
"files": [
|
||||||
"lib",
|
"lib",
|
||||||
"docs",
|
"docs",
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
"exports": "./lib/index.js",
|
"exports": "./lib/index.js",
|
||||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
"private": true,
|
||||||
"files": [
|
"files": [
|
||||||
"lib",
|
"lib",
|
||||||
"docs",
|
"docs",
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||||
"homepage": "https://github.com/logto-io/logto#readme",
|
"homepage": "https://github.com/logto-io/logto#readme",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"precommit": "lint-staged",
|
"precommit": "lint-staged",
|
||||||
"start": "parcel src/index.html",
|
"start": "parcel src/index.html",
|
||||||
|
|
|
@ -4,8 +4,10 @@
|
||||||
"description": "Logto demo app.",
|
"description": "Logto demo app.",
|
||||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
|
"version": "pnpm i --frozen-lockfile=false",
|
||||||
"precommit": "lint-staged",
|
"precommit": "lint-staged",
|
||||||
"start": "parcel src/index.html",
|
"start": "parcel src/index.html",
|
||||||
"dev": "cross-env PORT=5003 parcel src/index.html --public-url /demo-app --no-cache --hmr-port 6003",
|
"dev": "cross-env PORT=5003 parcel src/index.html --public-url /demo-app --no-cache --hmr-port 6003",
|
||||||
|
|
Loading…
Add table
Reference in a new issue