diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 34e52190f..7f7076667 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 }} @@ -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 }}