Skip to content

2.0.0 BETA 3

2.0.0 BETA 3 #52

Workflow file for this run

# This workflow will run tests using node and then publish a package when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Publish Package
on:
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true
release:
types: [published]
jobs:
publish-npm:
environment: release
runs-on: ubuntu-latest
env:
VERSION: ${{ inputs.version == '' && github.ref_name || inputs.version }}
NODE-VERSION: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE-VERSION }}
registry-url: https://registry.npmjs.org/
- name: Update version in package.json
run: |
sed -i 's/"version":.*$/"version": "${{ env.VERSION }}",/g' package.json
- name: Build and publish to npm
run: yarn install --frozen-lockfile
- name: Upload artifacts
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ADYEN_REACT_NATIVE_TOKEN }}
CI: true