-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (50 loc) · 1.73 KB
/
publish-headlessui-react-native.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
54
55
56
57
58
59
60
61
62
name: Publish Package and Create Release
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "20"
cache: yarn
- name: Setup yarn
run: npm install -g yarn
- name: Install dependencies
run: yarn install
- name: Get package version
id: package-version
run: echo ::set-output name=version::$(node -p "require('./package.json').version")
- name: Authenticate with NPM
run: |
npm set //registry.npmjs.org/:_authToken="${{ secrets.NPM_ACCESS_TOKEN }}"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
- name: Publish to NPM
run: npm publish --access public
- name: Package build
run: npm pack
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
with:
tag_name: v${{ steps.package-version.outputs.version }}
release_name: Release v${{ steps.package-version.outputs.version }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: styled-components-animatecss-${{ steps.package-version.outputs.version }}.tgz
asset_name: styled-components-animatecss-${{ steps.package-version.outputs.version }}.tgz
asset_content_type: application/gzip