forked from nocobase/nocobase
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
- Loading branch information
Showing
3 changed files
with
68 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,30 +4,48 @@ concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
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 "[email protected]" | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 "[email protected]" | ||
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,17 +73,15 @@ 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 | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: nocobase/nocobase:latest,${{ steps.meta.outputs.tags }} | ||
tags: nocobase/nocobase:latest,${{ steps.meta.outputs.tags }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters