publish 3.212.0 #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: V1 Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: release | |
| jobs: | |
| publish: | |
| if: github.actor != 'weka-version-bumper[bot]' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/create-github-app-token@v1 | |
| id: app-token | |
| with: | |
| app-id: 919414 | |
| private-key: ${{ secrets.WEKA_VERSION_BUMPER_PRIVATE_KEY }} | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ steps.app-token.outputs.token }} | |
| ref: main | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - run: | | |
| git config --global user.name 'github-actions' | |
| git config --global user.email 'github-actions@users.noreply.github.com' | |
| - run: git checkout main | |
| - name: Compute next version from latest git tag | |
| id: version_bump | |
| run: | | |
| LATEST_TAG=$(git tag -l '[0-9]*.[0-9]*.[0-9]*' --sort=-v:refname | grep -v '-' | head -1) | |
| echo "Latest stable tag: $LATEST_TAG" | |
| IFS='.' read -r MAJOR MINOR PATCH <<< "$LATEST_TAG" | |
| NEW_VERSION="$MAJOR.$((MINOR + 1)).0" | |
| echo "New version: $NEW_VERSION" | |
| echo "tag=$NEW_VERSION" >> $GITHUB_OUTPUT | |
| - name: Update package.json version | |
| run: npm version ${{ steps.version_bump.outputs.tag }} --no-git-tag-version --allow-same-version | |
| - run: git add package.json | |
| - run: git commit -m 'publish ${{ steps.version_bump.outputs.tag }}' | |
| - run: git tag ${{ steps.version_bump.outputs.tag }} | |
| - run: git push origin main | |
| - run: git push origin tag ${{ steps.version_bump.outputs.tag }} |