<commit_before>---
name: build-release
on: 
  pull_request:
      branches:
        - main
      types: [closed]

jobs:
  build:
    if: github.event.pull_request.merged == true
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Build
        run: |
          make build-darwin-amd64
          make build-linux-amd64
          make build-linux-arm64                
      - name: Release
        uses: softprops/action-gh-release@v1
        with:
          body_path: CHANGELOG.md
          tag_name: |
            echo v$(./gobcrypt_linux_amd64 -v | awk '{print $3}' | sed 's/-.*//')
          files: |
            gobcrypt_darwin_amd64
            gobcrypt_linux_amd64
            gobcrypt_linux_arm64

...<commit_msg>ci: set release tag as env<commit_after>---
name: build-release
on: 
  pull_request:
      branches:
        - main
      types: [closed]

jobs:
  build:
    if: github.event.pull_request.merged == true
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Build
        run: |
          make build-darwin-amd64
          make build-linux-amd64
          make build-linux-arm64
      - name: Set env
        run: echo "RELEASE_VERSION=$(./gobcrypt_linux_amd64 -v | awk '{print $3}' | sed 's/-.*//')" >> $GITHUB_ENV                         
      - name: Release
        uses: softprops/action-gh-release@v1
        with:
          body_path: CHANGELOG.md
          tag_name: $RELEASE_VERSION
          files: |
            gobcrypt_darwin_amd64
            gobcrypt_linux_amd64
            gobcrypt_linux_arm64

...
{'fraction_non_alphanumeric': 0.10315533980582524, 'fraction_numerical': 0.02063106796116505, 'mean_word_length': 1.5725429017160686, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4313754', 'n_tokens_mistral': 557, 'n_tokens_neox': 527, 'n_words': 111}