-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (45 loc) · 1.52 KB
/
publish-dev-release-react-transition-presence.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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 }}