Skip to content

Commit

Permalink
chore(ci): fix update version (#8)
Browse files Browse the repository at this point in the history
* chore(ci): fix update version

* chore(ci): update version

* chore(ci): update version script

* chore(ci): update version ci

* chore(ci): renmae update version ci name

* chore(ci): test update version

* chore(ci): fix update version ci

* chore(ci): fix update version

* chore(ci): rename update version pr
  • Loading branch information
hexf00 authored Jun 21, 2024
1 parent 68d8ec8 commit 6ec6baf
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
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

0 comments on commit 6ec6baf

Please sign in to comment.