-
Notifications
You must be signed in to change notification settings - Fork 15
96 lines (81 loc) · 3.4 KB
/
ci.yml
File metadata and controls
96 lines (81 loc) · 3.4 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Build & Deploy
on:
push:
branches:
- master
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Generate Changelog
uses: jaywcjlove/changelog-generator@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
head-ref: ${{ steps.create_tag.outputs.version }}
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
- name: Generate Contributors Images
uses: jaywcjlove/github-action-contributors@main
id: contributors
with:
avatarSize: 42
- name: Modify template/README.md
uses: jaywcjlove/github-action-modify-file-content@main
with:
path: template/README.md
openDelimiter: '<!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT-->'
closeDelimiter: '<!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT-END-->'
body: ${{steps.contributors.outputs.htmlList}}
- run: yarn install
# - name: HelloWorld -> Build Android Release
# working-directory: HelloWorld
# run: cd android && ./gradlew assembleRelease
- run: yarn run start
- run: git status
- run: npm i markdown-to-html-cli -g
- run: mkdir -p build
- run: markdown-to-html --output build/index.html --title "React Native UIW Template" --github-corners https://github.com/uiwjs/react-native-template --description="React Native Template for @uiw/react-native." --keywords="react-native-template,react-native,template"
- name: Deploy Website
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
- run: npm install @jsdevtools/npm-publish -g
- run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./template/package.json
release:
runs-on: ubuntu-latest
needs: build-deploy
steps:
- uses: actions/checkout@v3
- name: Is a tag created auto?
id: create_tag
uses: jaywcjlove/create-tag-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
package-path: ./template/package.json
- name: Generate Changelog
id: changelog
uses: jaywcjlove/changelog-generator@main
if: steps.create_tag.outputs.successful
with:
token: ${{ secrets.GITHUB_TOKEN }}
head-ref: ${{ steps.create_tag.outputs.version }}
filter-author: (renovate-bot|Renovate Bot)
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
- name: Create Release
uses: ncipollo/release-action@v1
if: steps.create_tag.outputs.successful
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.changelog.outputs.tag }}
tag: ${{ steps.changelog.outputs.tag }}
body: |
[](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-native-template@${{steps.changelog.outputs.version}}/file/README.md) [](https://www.npmjs.com/package/@uiw/react-native-template)
```bash
npm i @uiw/react-native-template@${{steps.changelog.outputs.version}}
```
${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}