Enhance null check, and bump packages (#32) #21
  
    
      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: release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "**.md" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| release: | |
| name: π Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@main | |
| - name: Bump version and push tag | |
| id: tag_version | |
| uses: mathieudutour/[email protected] | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| default_bump: minor | |
| - name: Create a GitHub release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: ${{ steps.tag_version.outputs.new_tag }} | |
| name: ${{ steps.tag_version.outputs.new_tag }} | |
| generateReleaseNotes: true | |
| - name: Parse current major version | |
| id: parse_major_version | |
| run: | | |
| majorVersion=$(echo ${{ steps.tag_version.outputs.new_tag }} | cut -d '.' -f 1) | |
| echo "Current major version is $majorVersion" | |
| echo "major_version=$majorVersion" >> $GITHUB_OUTPUT | |
| - name: Point major version tag to the latest tag | |
| run: | | |
| git fetch --tags | |
| git config --local user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git tag -f ${{ steps.parse_major_version.outputs.major_version }} ${{ steps.tag_version.outputs.new_tag }} | |
| git push origin ${{ steps.parse_major_version.outputs.major_version }} --force |