Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): fix update version #8

Merged
merged 9 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions .github/workflows/auto-update-version.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🎇 Update Repository
name: 🎇 Sync Univer version

on:
workflow_dispatch:
Expand All @@ -11,22 +11,26 @@ on:

jobs:
update:
if: inputs.version != ''
name: UpdateRepository
runs-on: arc-runner-set
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: update version
run: |
cd submodules/univer
git checkout v${{ inputs.version}}

- name: UpdateRepository
uses: technote-space/create-pr-action@v2
with:
EXECUTE_COMMANDS: |
npm version ${{ inputs.version }} --no-git-tag-version
cd univer-typedoc/submodules/univer
git checkout v${{ inputs.version}}
COMMIT_MESSAGE: 'chore(release): v${{ inputs.version }}'
sed -i 's/"version": "[^"]*"/"version": "0.1.16"/' package.json
COMMIT_MESSAGE: 'chore(release): sync univer to v${{ inputs.version }}'
COMMIT_NAME: GitHub Actions
PR_BRANCH_PREFIX: create-pr-action/
PR_BRANCH_NAME: 'update-repository-${PR_ID}'
PR_TITLE: 'chore: update repository'
PR_BRANCH_PREFIX: chore/
PR_BRANCH_NAME: 'sync-univer-to-v${{ inputs.version }}'
PR_TITLE: 'chore(release): sync univer to v${{ inputs.version }}'
4 changes: 2 additions & 2 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

deploy:
if: inputs.image-tag == ''
runs-on: arc-runner-set
runs-on: ubuntu-latest
needs: build
steps:
- uses: peter-evans/repository-dispatch@v2
Expand All @@ -33,7 +33,7 @@ jobs:

deploy-trigger:
if: inputs.image-tag != ''
runs-on: arc-runner-set
runs-on: ubuntu-latest
steps:
- uses: peter-evans/repository-dispatch@v2
with:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: 📤 Deploy Staging

on:
push:
branches:
- main
workflow_dispatch:
inputs:
image-tag:
Expand All @@ -21,7 +24,7 @@ jobs:

deploy:
if: inputs.image-tag == ''
runs-on: arc-runner-set
runs-on: ubuntu-latest
needs: build
steps:
- uses: peter-evans/repository-dispatch@v2
Expand All @@ -33,7 +36,7 @@ jobs:

deploy-trigger:
if: inputs.image-tag != ''
runs-on: arc-runner-set
runs-on: ubuntu-latest
steps:
- uses: peter-evans/repository-dispatch@v2
with:
Expand Down
Loading