Skip to content

Bump typescript from 3.8.3 to 5.3.3 (#113) #6

Bump typescript from 3.8.3 to 5.3.3 (#113)

Bump typescript from 3.8.3 to 5.3.3 (#113) #6

Workflow file for this run

name: Create release PR or Release Packages
on:
push:
branches:
- main
jobs:
manage_release:
name: Create release PR or Release Packages
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
# Get the latest 2 commits so we can compare the versions in package.json
fetch-depth: 2
- name: Setup Node
uses: actions/setup-node@v4
with:
cache: "npm"
node-version-file: ".nvmrc"
- name: Check if package version has changed
id: version_check
# Check if the version has changed between this commit's package.json and the previous commit's package.json
run: |
PREV_VERSION=$(git checkout -q HEAD^ && npm pkg get version && git switch -q -)
CURR_VERSION=$(npm pkg get version)
echo "versionChanged=$(if [ "$PREV_VERSION" = "$CURR_VERSION" ]; then echo "false"; else echo "true"; fi)" >> $GITHUB_OUTPUT
echo "version=$(echo $CURR_VERSION | xargs)" >> $GITHUB_OUTPUT
- run: npm install
- name: Create Release Pull Request
uses: changesets/action@v1
id: changesets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# The steps below here only run when there's something to publish
- name: Publish NPM
if: steps.changesets.outputs.hasChangesets == 'false' && steps.version_check.outputs.versionChanged == 'true'
run: ./gen-typescript.sh release ${VERSION}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
VERSION: ${{ steps.version_check.outputs.version }}
- name: Publish Android
if: steps.changesets.outputs.hasChangesets == 'false' && steps.version_check.outputs.versionChanged == 'true'
uses: ./.github/actions/generate-native-package
with:
access_token: ${{ secrets.ACCESS_TOKEN }}
platform: "android"
release_type: "release"
version: ${{ steps.version_check.outputs.version }}
- name: Publish iOS
if: steps.changesets.outputs.hasChangesets == 'false' && steps.version_check.outputs.versionChanged == 'true'
uses: ./.github/actions/generate-native-package
with:
access_token: ${{ secrets.ACCESS_TOKEN }}
platform: "ios"
release_type: "release"
version: ${{ steps.version_check.outputs.version }}
- name: Create release in GitHub
uses: changesets/action@v1
if: steps.changesets.outputs.hasChangesets == 'false' && steps.version_check.outputs.versionChanged == 'true'
with:
# We've already published above, but changesets needs this command to exit successfully to create the release in GitHub
publish: node -e true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}