ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Configure git uses: kota65535/github-git-config-action@v1 with: user.name: Tomohiko Ozawa user.email:
[email protected] - name: Get major version run: echo "MAJOR_VERSION=$(perl -ne 'print $1 if /^(.*?)\.(.*?)\.(.*?)$/' <<< '${{ inputs.version }}')" >> $GITHUB_ENV - name: Run npm version run: npm version ${{ inputs.version }} - name: Update the major version tag run: git tag -f v${{ env.MAJOR_VERSION }} - name: Push the version commit and tags run: | git pull --rebase --autostash git push origin HEAD git push -f --tags