Skip to content

Commit

Permalink
chore: optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
guoxianzhe committed Aug 22, 2024
1 parent afd1e8b commit dd38d4b
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,9 @@ on:
description: 'Do not touch or write anything, but show the commands'
default: true
type: boolean
publish-npm:
description: 'publish npm'
default: true
type: boolean

jobs:
release-it:
if: ${{ inputs.publish-npm }}
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
Expand Down Expand Up @@ -48,23 +43,13 @@ jobs:
git config --global user.name "${{ secrets.GIT_USERNAME }}"
yarn release ${{ inputs.increment }} --ci --no-git.tag --no-github.release --npm.allowSameVersion
update-example:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}

- name: Setup
uses: ./.github/actions/setup

- name: Update Example
if: ${{ !inputs.dry-run }}
id: package-info
run: |
git config --global user.email "${{ secrets.GIT_EMAIL }}"
git config --global user.name "${{ secrets.GIT_USERNAME }}"
yarn example add agora-electron-sdk@${{ inputs.increment }}
sed "s/\"version\": \"\(.*\)\"/\"version\": \"${{ inputs.increment }}\"/g" package.json > tmp
mv tmp package.json
working-directory: example

- name: Commit Example
if: ${{ !inputs.dry-run }}
Expand Down

0 comments on commit dd38d4b

Please sign in to comment.