Skip to content

Commit 03a0e40

Browse files
committed
Create project
0 parents  commit 03a0e40

File tree

10 files changed

+474
-0
lines changed

10 files changed

+474
-0
lines changed

.github/workflows/main.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 'Test job'
2+
on:
3+
release:
4+
types:
5+
- published
6+
7+
jobs:
8+
test-job:
9+
runs-on: ubuntu-latest
10+
name: Test job to run the custom action
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
with:
15+
token: ${{ secrets.GITHUB_TOKEN }}
16+
17+
- name: Send release to Discord Webhook
18+
uses: ./
19+
with:
20+
webhook_url: ${{ secrets.WEBHOOK_URL }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
.idea/

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# release-to-discord
2+
3+
This repo will contain everything necessary to create a custom JS github action from scratch to send release body to discord using a webhook.

action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: 'Release to Discord'
2+
description: 'Send GitHub release body to Discord using a webhook'
3+
inputs:
4+
webhook_url:
5+
description: 'Webhook URL to send release to'
6+
required: true
7+
runs:
8+
using: node20
9+
main: 'dist/index.js'

dist/index.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 325 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "release-to-discord",
3+
"private": true,
4+
"version": "1.0.0",
5+
"description": "JS github action to send release body to Discord using a webhook",
6+
"main": "src/index.ts",
7+
"scripts": {
8+
"main": "ncc run src/index.ts",
9+
"build": "ncc build src/index.ts -mt",
10+
"test": "echo \"Error: no test specified\" && exit 1"
11+
},
12+
"repository": {
13+
"type": "git",
14+
"url": "git+ssh://git@github.com/VueTorrent/release-to-discord.git"
15+
},
16+
"author": "Larsluph",
17+
"license": "GPL-3.0-only",
18+
"bugs": {
19+
"url": "https://github.com/VueTorrent/release-to-discord/issues"
20+
},
21+
"homepage": "https://github.com/VueTorrent/release-to-discord#readme",
22+
"dependencies": {
23+
"@actions/core": "^1.10.1",
24+
"@actions/github": "^6.0.0"
25+
},
26+
"devDependencies": {
27+
"@types/node": "^22.7.4",
28+
"@vercel/ncc": "^0.38.2",
29+
"typescript": "^5.6.2"
30+
}
31+
}

0 commit comments

Comments
 (0)