diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..ae2b63e --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +github: d10sfan diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..3deee26 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..a5f672d --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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 "action@github.com" + 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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..56880b4 --- /dev/null +++ b/.github/workflows/test.yml @@ -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 diff --git a/README.md b/README.md index 97546fb..277c316 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/package-lock.json b/package-lock.json index 0635a32..981d9e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,7 @@ "version": "1.0.0", "dependencies": { "@actions/core": "^1.9.1", - "@actions/github": "^5.1.1" - }, - "devDependencies": { + "@actions/github": "^5.1.1", "@zeit/ncc": "^0.22.3" } }, @@ -149,7 +147,6 @@ "resolved": "https://registry.npmjs.org/@zeit/ncc/-/ncc-0.22.3.tgz", "integrity": "sha512-jnCLpLXWuw/PAiJiVbLjA8WBC0IJQbFeUwF4I9M+23MvIxTxk5pD4Q8byQBSPmHQjz5aBoA7AKAElQxMpjrCLQ==", "deprecated": "@zeit/ncc is no longer maintained. Please use @vercel/ncc instead.", - "dev": true, "bin": { "ncc": "dist/ncc/cli.js" } @@ -372,8 +369,7 @@ "@zeit/ncc": { "version": "0.22.3", "resolved": "https://registry.npmjs.org/@zeit/ncc/-/ncc-0.22.3.tgz", - "integrity": "sha512-jnCLpLXWuw/PAiJiVbLjA8WBC0IJQbFeUwF4I9M+23MvIxTxk5pD4Q8byQBSPmHQjz5aBoA7AKAElQxMpjrCLQ==", - "dev": true + "integrity": "sha512-jnCLpLXWuw/PAiJiVbLjA8WBC0IJQbFeUwF4I9M+23MvIxTxk5pD4Q8byQBSPmHQjz5aBoA7AKAElQxMpjrCLQ==" }, "before-after-hook": { "version": "2.2.3", diff --git a/package.json b/package.json index d4f2028..1ca1d1b 100644 --- a/package.json +++ b/package.json @@ -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" } }