0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-20 21:32:31 -05:00

ci: publish workflow (#1342)

This commit is contained in:
Gao Sun 2022-07-01 18:47:14 +08:00 committed by GitHub
parent 496b17b527
commit d456f5c9a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 79 additions and 3 deletions

View file

@ -2,7 +2,10 @@ name: Dockerize
on:
push:
branches: [master]
branches:
- master
tags:
- v*.*.*
concurrency:
group: dockerize-${{ github.ref }}
@ -14,6 +17,17 @@ jobs:
steps:
- 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
uses: docker/setup-buildx-action@v2
@ -29,7 +43,8 @@ jobs:
with:
context: .
push: true
tags: ghcr.io/logto-io/logto:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Compose up
run: docker compose up -d

45
.github/workflows/publish.yml vendored Normal file
View 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

View file

@ -6,6 +6,7 @@
"exports": "./lib/index.js",
"author": "Silverhand Inc. <contact@silverhand.io>",
"license": "MPL-2.0",
"private": true,
"files": [
"lib",
"docs",

View file

@ -6,13 +6,13 @@
"exports": "./lib/index.js",
"author": "Silverhand Inc. <contact@silverhand.io>",
"license": "MPL-2.0",
"private": true,
"files": [
"lib",
"docs",
"logo.svg",
"README.md"
],
"private": false,
"scripts": {
"precommit": "lint-staged",
"build": "rm -rf lib/ && tsc -p tsconfig.build.json",

View file

@ -6,6 +6,7 @@
"exports": "./lib/index.js",
"author": "Silverhand Inc. <contact@silverhand.io>",
"license": "MPL-2.0",
"private": true,
"files": [
"lib",
"docs",

View file

@ -6,6 +6,7 @@
"exports": "./lib/index.js",
"author": "Silverhand Inc. <contact@silverhand.io>",
"license": "MPL-2.0",
"private": true,
"files": [
"lib",
"docs",

View file

@ -6,6 +6,7 @@
"exports": "./lib/index.js",
"author": "Silverhand Inc. <contact@silverhand.io>",
"license": "MPL-2.0",
"private": true,
"files": [
"lib",
"docs",

View file

@ -6,6 +6,7 @@
"exports": "./lib/index.js",
"author": "Silverhand Inc. <contact@silverhand.io>",
"license": "MPL-2.0",
"private": true,
"files": [
"lib",
"docs",

View file

@ -6,6 +6,7 @@
"exports": "./lib/index.js",
"author": "Silverhand Inc. <contact@silverhand.io>",
"license": "MPL-2.0",
"private": true,
"files": [
"lib",
"docs",

View file

@ -6,6 +6,7 @@
"exports": "./lib/index.js",
"author": "Silverhand Inc. <contact@silverhand.io>",
"license": "MPL-2.0",
"private": true,
"files": [
"lib",
"docs",

View file

@ -6,6 +6,7 @@
"exports": "./lib/index.js",
"author": "Silverhand Inc. <contact@silverhand.io>",
"license": "MPL-2.0",
"private": true,
"files": [
"lib",
"docs",

View file

@ -6,6 +6,7 @@
"exports": "./lib/index.js",
"author": "Silverhand Inc. <contact@silverhand.io>",
"license": "MPL-2.0",
"private": true,
"files": [
"lib",
"docs",

View file

@ -6,6 +6,7 @@
"exports": "./lib/index.js",
"author": "Silverhand Inc. <contact@silverhand.io>",
"license": "MPL-2.0",
"private": true,
"files": [
"lib",
"docs",

View file

@ -4,6 +4,7 @@
"main": "lib/index.js",
"author": "Silverhand Inc. <contact@silverhand.io>",
"license": "MPL-2.0",
"private": true,
"files": [
"lib"
],

View file

@ -6,6 +6,7 @@
"exports": "./lib/index.js",
"author": "Silverhand Inc. <contact@silverhand.io>",
"license": "MPL-2.0",
"private": true,
"files": [
"lib",
"docs",

View file

@ -6,6 +6,7 @@
"exports": "./lib/index.js",
"author": "Silverhand Inc. <contact@silverhand.io>",
"license": "MPL-2.0",
"private": true,
"files": [
"lib",
"docs",

View file

@ -5,6 +5,7 @@
"author": "Silverhand Inc. <contact@silverhand.io>",
"homepage": "https://github.com/logto-io/logto#readme",
"license": "MPL-2.0",
"private": true,
"scripts": {
"precommit": "lint-staged",
"start": "parcel src/index.html",

View file

@ -4,8 +4,10 @@
"description": "Logto demo app.",
"author": "Silverhand Inc. <contact@silverhand.io>",
"license": "MPL-2.0",
"private": true,
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"version": "pnpm i --frozen-lockfile=false",
"precommit": "lint-staged",
"start": "parcel src/index.html",
"dev": "cross-env PORT=5003 parcel src/index.html --public-url /demo-app --no-cache --hmr-port 6003",