Skip to content

fix: attributes thread safety issue (#73) #27

fix: attributes thread safety issue (#73)

fix: attributes thread safety issue (#73) #27

name: Create Tag And Release
on:
push:
branches: [ "main" ]
jobs:
release:
if: ${{ startsWith(github.event.head_commit.message, 'release:') }}
runs-on: ubuntu-latest
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
token: ${{ secrets.PROJECT_TOKEN }}
- name: Create new tag
run: |
echo "${{ env.COMMIT_MESSAGE }}"
version=$(echo "${{ env.COMMIT_MESSAGE }}" | grep -oP 'Swift \K\d+\.\d+\.\d+')
echo "release_version=$version" >> "$GITHUB_ENV"
echo $version
git config user.name '${{ vars.USER_NAME }}'
git config user.email '${{ vars.USER_EMAIL }}'
git tag $version
git push origin $version
- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
name: "Clickstream Swift ${{ env.release_version }}"
tag_name: "${{ env.release_version }}"
prerelease: true
generate_release_notes: true