mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 14:26:36 +00:00
48f1827f94
Some checks are pending
Build docker image / build-and-push (push) Waiting to run
Build pro image / build-and-push (push) Waiting to run
Deploy client docs / Build (push) Waiting to run
E2E / Build (push) Waiting to run
E2E / Core and plugins (push) Blocked by required conditions
E2E / plugin-workflow (push) Blocked by required conditions
E2E / plugin-workflow-approval (push) Blocked by required conditions
E2E / plugin-data-source-main (push) Blocked by required conditions
E2E / Comment on PR (push) Blocked by required conditions
NocoBase backend test / sqlite-test (20, false) (push) Waiting to run
NocoBase backend test / sqlite-test (20, true) (push) Waiting to run
NocoBase backend test / postgres-test (public, 20, nocobase, false) (push) Waiting to run
NocoBase backend test / postgres-test (public, 20, nocobase, true) (push) Waiting to run
NocoBase backend test / postgres-test (public, 20, public, false) (push) Waiting to run
NocoBase backend test / postgres-test (public, 20, public, true) (push) Waiting to run
NocoBase backend test / postgres-test (user_schema, 20, nocobase, false) (push) Waiting to run
NocoBase backend test / postgres-test (user_schema, 20, nocobase, true) (push) Waiting to run
NocoBase backend test / postgres-test (user_schema, 20, public, false) (push) Waiting to run
NocoBase backend test / postgres-test (user_schema, 20, public, true) (push) Waiting to run
NocoBase backend test / mysql-test (20, false) (push) Waiting to run
NocoBase backend test / mysql-test (20, true) (push) Waiting to run
NocoBase backend test / mariadb-test (20, false) (push) Waiting to run
NocoBase backend test / mariadb-test (20, true) (push) Waiting to run
NocoBase frontEnd test / frontend-test (18) (push) Waiting to run
Test on Windows / build (push) Waiting to run
* chore(ci): optimize * chore: update * chore: update * chore: update * chore: update * chore: update * chore: update * chore: update * chore: update
94 lines
3.3 KiB
YAML
94 lines
3.3 KiB
YAML
name: Write changelog and create release
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
type: choice
|
|
description: Please choose a version
|
|
options:
|
|
- beta
|
|
- alpha
|
|
default: beta
|
|
push:
|
|
tags:
|
|
- 'v*-beta'
|
|
|
|
jobs:
|
|
write-changelog-and-release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Get info
|
|
id: get-info
|
|
run: |
|
|
if [[ "${{ inputs.version }}" == "alpha" ]]; then
|
|
echo "branch=$(echo 'next')" >> $GITHUB_OUTPUT
|
|
echo "proRepos=$(echo '${{ vars.NEXT_PRO_PLUGIN_REPOS }}')" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "branch=$(echo 'main')" >> $GITHUB_OUTPUT
|
|
echo "proRepos=$(echo '${{ vars.PRO_PLUGIN_REPOS }}')" >> $GITHUB_OUTPUT
|
|
fi
|
|
- uses: actions/create-github-app-token@v1
|
|
id: app-token
|
|
with:
|
|
app-id: ${{ vars.NOCOBASE_APP_ID }}
|
|
private-key: ${{ secrets.NOCOBASE_APP_PRIVATE_KEY }}
|
|
repositories: nocobase,pro-plugins,${{ join(fromJSON(steps.get-info.outputs.proRepos), ',') }}
|
|
skip-token-revoke: true
|
|
- name: Get GitHub App User ID
|
|
id: get-user-id
|
|
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
|
|
env:
|
|
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: nocobase/nocobase
|
|
ref: ${{ steps.get-info.outputs.branch }}
|
|
token: ${{ steps.app-token.outputs.token }}
|
|
persist-credentials: true
|
|
fetch-depth: 0
|
|
- name: Checkout pro-plugins
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: nocobase/pro-plugins
|
|
path: packages/pro-plugins
|
|
ref: ${{ steps.get-info.outputs.branch }}
|
|
fetch-depth: 0
|
|
token: ${{ steps.app-token.outputs.token }}
|
|
persist-credentials: true
|
|
- name: Clone pro repos
|
|
shell: bash
|
|
run: |
|
|
for repo in ${{ join(fromJSON(steps.get-info.outputs.proRepos), ' ') }}
|
|
do
|
|
git clone -b ${{ steps.get-info.outputs.branch }} https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/nocobase/$repo.git packages/pro-plugins/@nocobase/$repo
|
|
done
|
|
- name: Set user
|
|
run: |
|
|
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
|
|
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
|
|
- name: Set Node.js 18
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
- name: Install dependencies
|
|
run: yarn install --frozen-lockfile
|
|
- name: Run script
|
|
shell: bash
|
|
run: |
|
|
node scripts/release/changelogAndRelease.js --ver ${{ inputs.version }} --cmsURL ${{ secrets.CMS_URL }} --cmsToken ${{ secrets.CMS_TOKEN }}
|
|
env:
|
|
PRO_PLUGIN_REPOS: ${{ steps.get-info.outputs.proRepos }}
|
|
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
- name: Commit and push
|
|
run: |
|
|
git pull origin main
|
|
git add .
|
|
git commit -m "docs: update changelogs"
|
|
git push origin main
|