Skip to content

Commit

Permalink
Merge pull request #47 from LikeMindsCommunity/release/v1.0.3
Browse files Browse the repository at this point in the history
Release v1.0.3
  • Loading branch information
jaixchaudhary authored Apr 29, 2024
2 parents 0fe72c2 + 853089a commit b4bf906
Show file tree
Hide file tree
Showing 13 changed files with 530 additions and 189 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/create_tag_and_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Publish Create Tag and Git Release

on:
push:
branches:
- "master"

permissions: write-all

defaults:
run:
working-directory: ./likeminds-chat-reactnative-integration

jobs:
create_tag:
name: Create Git Tag
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check for version changes
run: |
# Fetch all tags from the remote repository
git fetch --tags
# Get the previous version from the last release tag
export previous_version=$(git describe --tags --abbrev=0)
# Get the current version from package.json
export current_version=$(cat package.json | grep '"version":' | awk -F'"' '{print $4}')
if [[ "$previous_version" != "v$current_version" ]]; then
echo "Version has changed from $previous_version to v$current_version."
else
echo "Version has not changed."
exit 1
fi
- name: Push Git Tag
run: |
# Git login
git config --global user.name "$(git log -n 1 --pretty=format:%an)"
git config --global user.email "$(git log -n 1 --pretty=format:%ae)"
# Push a Git tag with the new version
export current_version=$(cat package.json | grep '"version":' | awk -F'"' '{print $4}')
git tag -a "v$current_version" -m "Version $current_version"
git push origin "v$current_version"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
create-github-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: create_tag
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Create Release
run: gh release create "$(git describe --tags --abbrev=0)" --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ yarn-error.log

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

google-services.json
GoogleService-Info.plist
Loading

0 comments on commit b4bf906

Please sign in to comment.