Skip to content

Release

Release #2

Workflow file for this run

name: Release
# Publishes @phantom/react-native-fast-image to public npm via npm Trusted Publishing
# (keyless OIDC). Security enabled the Trusted Publisher for this repo + this workflow
# file, so there is no NPM token to manage. Requires `id-token: write` and npm >= 11.5.1.
#
# To cut a release: bump "version" in package.json on main, then publish a GitHub
# Release tagged v<version> (e.g. v8.6.6), or run this workflow manually.
on:
release:
types: [published]
workflow_dispatch: {}
permissions:
contents: read
id-token: write
jobs:
publish:
name: Publish to npm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
# Trusted Publishing (OIDC) requires npm >= 11.5.1; Node 20 ships npm 10.x.
- name: Upgrade npm
run: npm install -g npm@latest
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
# No NODE_AUTH_TOKEN: npm exchanges the GitHub OIDC token via the Trusted Publisher.
- name: Publish
run: npm publish --access public