Skip to content

Commit

Permalink
add: deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Mansi1 committed Aug 2, 2023
1 parent 016956a commit 681dfba
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 3 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/test.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,35 @@ jobs:
- run: yarn install --frozen-lockfile
- run: yarn lint
- run: yarn build
- name: Add artifact to github
uses: actions/upload-artifact@v2
with:
name: artifact
path: dist
- run: yarn test
npm-publish:
needs: [build]
name: npm-publish
runs-on: ubuntu-latest
# only on master
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Download build
uses: actions/download-artifact@v2
with:
name: artifact
path: dist
- run: yarn release:package
- name: Publish if version in package.json change
uses: springtype-org/github-action-npm-publish@master
with:
install_build_packages: false
project_build_dir: release
create_tag: true
auth_token: ${{ secrets.NPM_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ coverage
.env
/.idea/
/yarn-error.log
release
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Aron Homberg and JS Heaven contributors
Copyright (c) 2023 Michael Mannseicher and JS Heaven contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,18 @@
},
"scripts": {
"prepare": "husky install",
"pretest": "yarn build --dev",
"test": "NODE_OPTIONS='--experimental-vm-modules --enable-source-maps --no-warnings' jest --verbose --coverage ./test/*.test.ts ./test/**/*.test.ts",
"clean": "rm -rf ./dist && rm -rf ./coverage",
"lint": "prettier --check .",
"lint:fix": "prettier --write .",
"prebuild": "yarn clean",
"build": "yarn node --enable-source-maps ./build.mjs",
"prerelease:package": "rm -rf ./release",
"release:package": "mkdir release && cp -r dist package.json LICENSE README.md release/",
"pre-commit": "yarn lint",
"pre-push": "yarn lint"
},
"author": "Aron Homberg <[email protected]>",
"author": "Michael Mannseicher<[email protected]>",
"sideEffects": false,
"exports": {
".": {
Expand Down

0 comments on commit 681dfba

Please sign in to comment.