-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
62 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Library build | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build Package | ||
run: npm run build | ||
|
||
- name: prepare package | ||
run: | | ||
mkdir out | ||
mv package.json out | ||
mv dist out | ||
mv README.md out | ||
mv LICENSE out | ||
mv .gitignore out | ||
- name: List Contents of out folder | ||
run: ls -R out | ||
|
||
- name: Prepare Production Release | ||
uses: s0/git-publish-subdir-action@develop | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
env: | ||
REPO: self | ||
BRANCH: production | ||
FOLDER: out | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
MESSAGE: "Build: ({sha}) {msg}" | ||
|
||
- name: Publish to NPM | ||
run: | | ||
cd out/ | ||
cp package.json ./dist/package.json | ||
cp README.md ./dist/README.md | ||
npm publish ./dist | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters