fix: Revert: "fix: deep link analytics event triggered twice" (#11221) #3
Workflow file for this run
This file contains 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 with Changelog | |
on: | |
push: | |
tags: | |
# we are using ios submisson tag although it is the same commit hash with android | |
- "ios-*-release" | |
permissions: | |
contents: write | |
jobs: | |
generate-release: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" # Adjust as needed | |
cache: "yarn" | |
- name: Fetch all tags | |
run: git fetch --tags | |
- name: Determine iOS tags | |
id: determine_ios_tags | |
run: | | |
# Get all iOS submission tags and sort them | |
ios_tags=$(git tag --list "ios-*-release" | sort -V) | |
# Get the last and second-to-last iOS tags | |
last_tag=$(echo "$ios_tags" | tail -n1) | |
second_last_tag=$(echo "$ios_tags" | tail -n2 | head -n1) | |
# Ensure tags are found | |
if [ -z "$last_tag" ] || [ -z "$second_last_tag" ]; then | |
echo "Error: Could not determine last or second-to-last iOS tag." | |
exit 1 | |
fi | |
# Export tags for later steps | |
echo "last_tag=$last_tag" >> $GITHUB_ENV | |
echo "second_last_tag=$second_last_tag" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: | | |
npm install -g yarn | |
yarn install | |
yarn global add tsx | |
- name: Generate changelog | |
id: generate_changelog | |
run: | | |
changelog=$(yarn generate-changelog "${{ env.second_last_tag }}" "${{ env.last_tag }}") | |
echo "changelog<<EOF" >> $GITHUB_ENV | |
echo "$changelog" >> $GITHUB_ENV | |
echo "EOF" >> $GITHUB_ENV | |
env: | |
CHANGELOG_GITHUB_TOKEN_KEY: ${{ secrets.CHANGELOG_GITHUB_TOKEN_KEY }} | |
- name: Create release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release create "${{ env.last_tag }}" \ | |
--repo "${{ github.repository }}" \ | |
--title "Release ${{ env.last_tag }}" \ | |
--notes "${{ env.changelog }}" |