Skip to content

chore: release 3.0.0-beta.0 #36

chore: release 3.0.0-beta.0

chore: release 3.0.0-beta.0 #36

Workflow file for this run

name: 'Build & Publish to NPM'
on:
push:
tags:
- v**
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: read
jobs:
build-and-publish:
name: Build & Publish
runs-on: ubuntu-latest
steps:
- name: 👀 Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: 🏷 Set vars
id: vars
run: |
echo "package-version=${GITHUB_REF#refs/*/v}" >> $GITHUB_OUTPUT
echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
echo "npm-tag=$(node ./scripts/pkg.get-tag.js)" >> $GITHUB_OUTPUT
- name: 🛠️ Set up environment
uses: ./.github/actions/setup
- name: 🚀 Publish to NPM
run: npm publish --tag "$NPM_TAG"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TAG: ${{ steps.vars.outputs.npm-tag }}
- name: 🗒 Add summary
if: ${{ success() }}
run: |
echo 'RN SDK [${{ steps.vars.outputs.tag }}](https://github.com/Giphy/giphy-react-native-sdk/releases/tag/${{ steps.vars.outputs.tag }}) released.' >> $GITHUB_STEP_SUMMARY
echo 'Release: <https://github.com/Giphy/giphy-react-native-sdk/releases/tag/${{ steps.vars.outputs.tag }}>' >> $GITHUB_STEP_SUMMARY
echo 'NPM: <https://www.npmjs.com/package/@giphy/react-native-sdk/v/${{ steps.vars.outputs.package-version }}>' >> $GITHUB_STEP_SUMMARY