Skip to content

.github/workflows/generate-prerelease.yml #44

.github/workflows/generate-prerelease.yml

.github/workflows/generate-prerelease.yml #44

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
repo: bridget-android
- platform: ios
repo: 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: ${{ join(['bridget', matrix.repo]) }}

Check failure on line 64 in .github/workflows/generate-prerelease.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/generate-prerelease.yml

Invalid workflow file

The workflow is not valid. .github/workflows/generate-prerelease.yml (Line: 64, Col: 25): Unexpected symbol: '['. Located at position 6 within expression: join(['bridget', matrix.repo])
- 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 }}