Skip to content

Commit

Permalink
Using gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
d10sfan committed Feb 7, 2024
1 parent 32cf4a5 commit c94e89f
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: d10sfan
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
29 changes: 29 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build Action
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: NPM Install
run: npm ci
- name: Build
run: node_modules/@vercel/ncc/dist/ncc/cli.js build index.js
- name: Commit package.json
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A dist
git commit -m "Update dist"
- name: Push Changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
17 changes: 17 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Test Action
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: NPM Install
run: npm ci
- name: Build
run: node_modules/@vercel/ncc/dist/ncc/cli.js build index.js
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ GitHub Action to update packages.json
## Building

* Make any changes to the index.js
* Once done, run the following command `node_modules/@zeit/ncc/dist/ncc/cli.js build index.js` and create a tag
* GH Action will automatically build once committed
8 changes: 2 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
"homepage": "https://github.com/luxtorpeda-dev/action-build-get-engine-name#readme",
"dependencies": {
"@actions/core": "^1.9.1",
"@actions/github": "^5.1.1"
},
"devDependencies": {
"@actions/github": "^5.1.1",
"@zeit/ncc": "^0.22.3"
}
}

0 comments on commit c94e89f

Please sign in to comment.