Skip to content

v0.0.0-2024-03-19-snapshot-signin #50

v0.0.0-2024-03-19-snapshot-signin

v0.0.0-2024-03-19-snapshot-signin #50

on:
release:
types: [published]
permissions:
contents: write
jobs:
get_version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version_step.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Version from latest tag
id: version_step
run: |
VERSION=$(git describe --tags --abbrev=0)
echo $VERSION
echo "version=$VERSION" >> $GITHUB_OUTPUT
generate-typescript-package:
needs: get_version
if: "github.event.release.prerelease"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: "npm"
node-version-file: ".nvmrc"
- name: install
run: npm install
- name: generate and publish
run: ./gen-typescript.sh prerelease ${VERSION}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
VERSION: ${{ needs.get_version.outputs.version }}
native-release:
needs: get_version
runs-on: ubuntu-latest
strategy:
fail-fast: false # do not cancel other in progress jobs if any single one fails
matrix:
include:
- platform: android
repository: bridget-android
- platform: ios
repository: bridget-swift
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
owner: guardian
repositories: ${{ format('bridget,{0}', matrix.repository) }} # e.g "bridget,bridget-swift"
- uses: actions/checkout@v4
- uses: ./.github/actions/generate-native-package
with:
access_token: ${{ steps.app-token.outputs.token }}
platform: ${{ matrix.platform }}
release_type: "prerelease"
version: ${{ needs.get_version.outputs.version }}