mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 05:29:26 +08:00
chore: release ci (#4293)
* chore: release ci * chore: release ci * chore: release ci * chore: release ci * chore: release ci * chore: release ci * chore: release ci * chore: release ci * chore: release ci * chore: release ci * chore: release ci * chore: release ci
This commit is contained in:
parent
65f8bd48ae
commit
03fdee19ba
62
.github/workflows/manual-release.yml
vendored
62
.github/workflows/manual-release.yml
vendored
@ -6,28 +6,46 @@ concurrency:
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
pr_number:
|
||||
description: 'Please enter a pull request number'
|
||||
required: true
|
||||
jobs:
|
||||
build:
|
||||
push-commit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- run: gh pr checkout ${{ inputs.pr_number }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Commit files
|
||||
run: |
|
||||
yarn install
|
||||
yarn version:alpha -y
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git commit -a -m "Add changes"
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: ${{ github.head_ref }}
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Checkout pro-plugins
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: nocobase/pro-plugins
|
||||
path: packages/pro-plugins
|
||||
ssh-key: ${{ secrets.PRO_PLUGINS_DEPLOY_KEY }}
|
||||
persist-credentials: true
|
||||
- name: Set Node.js 18
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
- name: Run install
|
||||
uses: borales/actions-yarn@v4
|
||||
with:
|
||||
cmd: install
|
||||
- name: Run release.sh
|
||||
run: |
|
||||
git config --global user.email "actions@github.com"
|
||||
git config --global user.name "GitHub Actions Bot"
|
||||
echo "packages/pro-plugins/" >> .git/info/exclude
|
||||
bash release.sh
|
||||
- name: push pro plugins
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
ssh: true
|
||||
branch: main
|
||||
directory: packages/pro-plugins
|
||||
repository: nocobase/pro-plugins
|
||||
tags: true
|
||||
atomic: true
|
||||
- name: push
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: ${{ github.head_ref }}
|
||||
tags: true
|
||||
atomic: true
|
||||
|
42
.github/workflows/release.yml
vendored
42
.github/workflows/release.yml
vendored
@ -14,17 +14,20 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
container: node:18
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
-
|
||||
name: yarn install and build
|
||||
- name: Checkout pro-plugins
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: nocobase/pro-plugins
|
||||
path: packages/pro-plugins
|
||||
ssh-key: ${{ secrets.SUBMODULE_SSH_KEY }}
|
||||
- name: yarn install and build
|
||||
run: |
|
||||
yarn config set registry https://registry.npmjs.org/
|
||||
yarn install
|
||||
yarn build
|
||||
-
|
||||
name: publish npmjs.org
|
||||
- name: publish npmjs.org
|
||||
run: |
|
||||
git config --global user.email "test@mail.com"
|
||||
git config --global user.name "test"
|
||||
@ -40,21 +43,26 @@ jobs:
|
||||
yarn config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
|
||||
npm whoami
|
||||
yarn release:force --no-verify-access --no-git-reset --registry https://registry.npmjs.org/
|
||||
- name: publish pkg.nocobase.com
|
||||
run: |
|
||||
yarn config set //pkg.nocobase.com/:_authToken=${{ secrets.PKG_NOCOBASE_TOKEN }}
|
||||
yarn release:force --no-verify-access --no-git-reset --registry https://pkg.nocobase.com
|
||||
- name: publish pkg-src.nocobase.com
|
||||
run: |
|
||||
bash generate-npmignore.sh ignore-src
|
||||
yarn config set //pkg-src.nocobase.com/:_authToken=${{ secrets.PKG_SRC_NOCOBASE_TOKEN }}
|
||||
yarn release:force --no-verify-access --no-git-reset --registry https://pkg-src.nocobase.com
|
||||
push-docker:
|
||||
runs-on: ubuntu-latest
|
||||
needs: publish-npm
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
-
|
||||
name: Set up QEMU
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
-
|
||||
name: Docker meta
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
@ -65,14 +73,12 @@ jobs:
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
-
|
||||
name: Login to Docker Hub
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Build and push
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: ./docker/nocobase
|
||||
|
@ -3,7 +3,7 @@ cd ./packages/pro-plugins
|
||||
git add .
|
||||
git commit -m "chore(versions): 😊 publish v$(jq -r '.version' ../../lerna.json)"
|
||||
git tag v$(jq -r '.version' ../../lerna.json)
|
||||
git push --atomic origin main v$(jq -r '.version' ../../lerna.json)
|
||||
#git push --atomic origin main v$(jq -r '.version' ../../lerna.json)
|
||||
cd ../../
|
||||
git add .
|
||||
git commit -m "chore(versions): 😊 publish v$(jq -r '.version' lerna.json)"
|
||||
@ -11,4 +11,4 @@ git tag v$(jq -r '.version' lerna.json)
|
||||
yarn changelog --breaking-pattern "BREAKING CHANGE:"
|
||||
git add .
|
||||
git commit -m "chore: update changelog"
|
||||
git push --atomic origin main v$(jq -r '.version' lerna.json)
|
||||
#git push --atomic origin main v$(jq -r '.version' lerna.json)
|
||||
|
Loading…
x
Reference in New Issue
Block a user