Skip to content

Merge pull request #112 from mediamonks/bugfix/remove-mandatory-key-f… #8

Merge pull request #112 from mediamonks/bugfix/remove-mandatory-key-f…

Merge pull request #112 from mediamonks/bugfix/remove-mandatory-key-f… #8

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: |
echo "$(npm pkg get version --prefix packages/react-transition-presence | cut -d '"' -f 2 | cut -d '-' -f 1)-dev.$(git rev-parse --short HEAD)" | xargs npm version --no-git-tag-version
- 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 }}