Skip to content

Merge pull request #205 from mediamonks/feature/#182-using-transition… #11

Merge pull request #205 from mediamonks/feature/#182-using-transition…

Merge pull request #205 from mediamonks/feature/#182-using-transition… #11

name: Publish dev release for react-transition-presence
on:
push:
branches: [main]
paths:
- 'packages/react-transition-presence/**'
jobs:
bump-version:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Check out source
uses: actions/checkout@v3
with:
ssh-key: ${{secrets.DEPLOY_KEY}}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Install dependencies
env:
GSAP_TOKEN: ${{ secrets.GSAP_TOKEN }}
run: |
npm config set //npm.greensock.com/:_authToken=$GSAP_TOKEN
npm config set @gsap:registry=https://npm.greensock.com
npm ci
- name: Setup Git
run: |
git config user.name github-actions
git config user.email [email protected]
- name: Bump version
# gets the version from the package.json, removes the quotes and the prerelease part, adds the git hash and sets the version
# example: 1.0.0-alpha.0 -> 1.0.0-dev.1234567
run: |
cd packages/react-transition-presence
npm version prerelease --preid="$(git rev-parse --short HEAD)" --no-git-tag-version
cd ../..
- name: Publish
run: |
npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
npm publish -w packages/react-transition-presence --tag next --provenance
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}