diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..03229803d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,41 @@ +name: Release + +# Publishes @phantom/react-native-fast-image to public npm. The @phantom scope is +# public on npmjs.org (the wallet's Artifactory registry proxies it), so this mirrors +# the publish setup used by phantom/react-native-webview, just triggered by a release +# rather than changesets since this fork is bumped infrequently. +# +# To cut a release: bump "version" in package.json on main, then publish a GitHub +# Release tagged v (e.g. v8.6.6). This workflow publishes that version. + +on: + release: + types: [published] + workflow_dispatch: {} + +permissions: + contents: read + +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 + registry-url: "https://registry.npmjs.org" + scope: "@phantom" + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Build + run: yarn build + + - name: Publish + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN_PHANTOM_SECURITY_BOT }} diff --git a/package.json b/package.json index 9438ecc9c..9034f9fc8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@phantom/react-native-fast-image", - "version": "8.6.5", + "version": "8.6.6", "description": "🚩 FastImage, performant React Native image component.", "keywords": [ "cache",