Skip to content

Commit bdc1048

Browse files
committed
GitHub Actions
1 parent 8468bf4 commit bdc1048

File tree

2 files changed

+88
-0
lines changed

2 files changed

+88
-0
lines changed

.github/CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<div align="center" style="margin-bottom: 0.5rem">
2+
<img src="https://raw.githubusercontent.com/float-toolkit/react/HEAD/media/ftreact.svg" width="100" />
3+
</div>
4+
5+
<h1 align="center">Contribution guidelines</h1>
6+
7+
If you wish to contribute to the **Float Toolkit for React** source code, feel free to fork the repository and submit a pull request.
8+
9+
## Steps
10+
11+
1. Fork and clone the repository, and checkout the corresponding branch (`docs` for documentation, `master` for anything else). **DO NOT** modify the `stable` branch.
12+
1. Make your changes.
13+
1. Run `npm run build` (or VSCode task _NPM: Build_) to build the package (you can use `npm link` to try it locally).
14+
1. [Submit a pull request](https://github.com/float-toolkit/react/compare).
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Publish NPM package
2+
3+
on:
4+
push:
5+
branches:
6+
- "stable"
7+
tags:
8+
- "**"
9+
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
name: Build package
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v3
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Build
25+
run: npm run build
26+
27+
- name: Upload dist artifact
28+
uses: actions/upload-artifact@v3
29+
with:
30+
name: dist
31+
path: dist
32+
33+
- name: Upload typings artifact
34+
uses: actions/upload-artifact@v3
35+
with:
36+
name: typings
37+
path: typings
38+
39+
publish:
40+
name: Publish on NPM and GitHub Packages
41+
needs: build
42+
runs-on: ubuntu-latest
43+
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@v3
47+
48+
- name: Download dist artifact
49+
uses: actions/download-artifact@v3
50+
with:
51+
name: dist
52+
path: dist
53+
54+
- name: Download typings artifact
55+
uses: actions/download-artifact@v3
56+
with:
57+
name: typings
58+
path: typings
59+
60+
- name: Publish on NPM
61+
uses: JS-DevTools/[email protected]
62+
with:
63+
access: public
64+
registry: https://registry.npmjs.org/
65+
token: ${{ secrets.NPM_TOKEN }}
66+
check-version: false
67+
68+
- name: Publish on GitHub Packages
69+
uses: JS-DevTools/[email protected]
70+
with:
71+
access: public
72+
registry: https://npm.pkg.github.com/
73+
token: ${{ secrets.GITHUB_TOKEN }}
74+
check-version: false

0 commit comments

Comments
 (0)