mirror of
https://github.com/SethCohen/github-releases-to-discord
synced 2026-09-14 20:13:23 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5abfa09d3 | ||
|
|
a49a5347be | ||
|
|
a0914f433a | ||
|
|
7f6cee8772 | ||
|
|
6382bf4bfb | ||
|
|
3a1a5b68a2 | ||
|
|
6a018ddca1 | ||
|
|
8c4da10759 | ||
|
|
8ebec0c4c4 | ||
|
|
8212a24dfa | ||
|
|
233db9c33f | ||
|
|
5001ed03b7 | ||
|
|
f7e8576166 | ||
|
|
baa4c82901 | ||
|
|
aea0a60ccd | ||
|
|
e49c674890 | ||
|
|
f84f12e7b0 | ||
|
|
c64205076b | ||
|
|
e384a39c62 | ||
|
|
0e4e0d83ff | ||
|
|
54e99ee992 | ||
|
|
baad0090bf |
@@ -13,6 +13,6 @@ jobs:
|
||||
id: release
|
||||
with:
|
||||
webhook_url: ${{ secrets.WEBHOOK_URL }}
|
||||
colour: "7766090"
|
||||
username: "tes"
|
||||
avatar_url: "https://i.imgur.com/UPbV3Nx.png"
|
||||
color: "2105893"
|
||||
username: "Release Changelog"
|
||||
avatar_url: "https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png"
|
||||
@@ -1,5 +1,32 @@
|
||||
# Changelog
|
||||
|
||||
## [1.12.0](https://github.com/SethCohen/github-release-to-discord/compare/v1.11.1...v1.12.0) (2022-08-24)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* renamed all `colour`>`color` ([a0914f4](https://github.com/SethCohen/github-release-to-discord/commit/a0914f433a5c2a2626ca39637851235fd4f7adea))
|
||||
|
||||
## [1.11.1](https://github.com/SethCohen/github-release-to-discord/compare/v1.11.0...v1.11.1) (2022-08-24)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* fixed ReferenceError on require vs import ([233db9c](https://github.com/SethCohen/github-release-to-discord/commit/233db9c33f9059cbe008e61acf7f321e671f352c))
|
||||
|
||||
## [1.11.0](https://github.com/SethCohen/github-release-to-discord/compare/v1.10.1...v1.11.0) (2022-08-24)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* updated `action.yml` ([e49c674](https://github.com/SethCohen/github-release-to-discord/commit/e49c674890cd5309d63bf570a550ffa0361c9ebc))
|
||||
* updated `package.json` ([aea0a60](https://github.com/SethCohen/github-release-to-discord/commit/aea0a60ccd2456ae24e6ce7f21c1622a1b3ee18f))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* fixed version tag ([baa4c82](https://github.com/SethCohen/github-release-to-discord/commit/baa4c82901455b2fbc18187cfa8f74f2a171f033))
|
||||
|
||||
## [1.10.0](https://github.com/SethCohen/github-release-to-discord/compare/v1.9.0...v1.10.0) (2022-08-24)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 SethCohen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,17 +1,17 @@
|
||||
# Github Release To Discord Action
|
||||
# GitHub Release To Discord Action
|
||||
|
||||
This action parses a github release and posts it to a discord channel via a discord webhook.
|
||||
This action parses a GitHub release and posts it to a Discord channel via a Discord webhook.
|
||||
## Configuration
|
||||
| Variable | Required | Default | Description |
|
||||
|-------------|----------|----------------------------------------------------------------------------------------------------------------|---------------------------------------------|
|
||||
| Variable | Required | Default | Description |
|
||||
|------------|----------|----------------------------------------------------------------------------------------------------------------|--------------------------------------------|
|
||||
| webhook_url | ✔ | | Discord's webhook url. Use GH repo secrets. |
|
||||
| colour | ❌ | "2105893" | Decimal colour value for embed. |
|
||||
| username | ❌ | "Release Changelog" | String username for webhook. |
|
||||
| avatar_url | ❌ | ["Profile Picture"](https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png) | String url to webhook avatar picture. |
|
||||
| color | ❌ | "2105893" | Decimal color value for embed. |
|
||||
| username | ❌ | "Release Changelog" | String username for webhook. |
|
||||
| avatar_url | ❌ | ["Profile Picture"](https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png) | String url to webhook avatar picture. |
|
||||
|
||||
|
||||
## Output
|
||||

|
||||

|
||||
|
||||
## Example usage
|
||||
|
||||
@@ -31,4 +31,7 @@ jobs:
|
||||
id: release
|
||||
with:
|
||||
webhook_url: ${{ secrets.WEBHOOK_URL }}
|
||||
color: "2105893"
|
||||
username: "Release Changelog"
|
||||
avatar_url: "https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png"
|
||||
```
|
||||
+7
-3
@@ -1,11 +1,12 @@
|
||||
name: Github Releases To Discord
|
||||
author: SethCohen
|
||||
description: Send automatic styled releases to Discord.
|
||||
inputs:
|
||||
webhook_url:
|
||||
description: Discord's webhook url. Use GH repo secrets.
|
||||
required: true
|
||||
colour:
|
||||
description: Decimal colour value for embed.
|
||||
color:
|
||||
description: Decimal color value for embed.
|
||||
required: false
|
||||
default: '2105893'
|
||||
username:
|
||||
@@ -18,4 +19,7 @@ inputs:
|
||||
default: 'https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png'
|
||||
runs:
|
||||
using: 'node16'
|
||||
main: 'index.js'
|
||||
main: 'index.js'
|
||||
branding:
|
||||
icon: file-text
|
||||
color: gray-dark
|
||||
@@ -1,6 +1,6 @@
|
||||
const core = require('@actions/core');
|
||||
const github = require('@actions/github');
|
||||
const fetch = require('node-fetch')
|
||||
import core from '@actions/core';
|
||||
import github from '@actions/github';
|
||||
import fetch from 'node-fetch';
|
||||
|
||||
async function getContext () {
|
||||
const payload = github.context.payload
|
||||
@@ -17,7 +17,7 @@ async function getContext () {
|
||||
async function run () {
|
||||
try {
|
||||
const webhookUrl = core.getInput('webhook_url')
|
||||
const colour = core.getInput('colour')
|
||||
const color = core.getInput('color')
|
||||
const username = core.getInput('username')
|
||||
const avatarUrl = core.getInput('avatar_url')
|
||||
|
||||
@@ -41,7 +41,7 @@ async function run () {
|
||||
const embedMsg = {
|
||||
title: `Release ${content.version}`,
|
||||
url: content.html_url,
|
||||
color: colour,
|
||||
color: color,
|
||||
description: description,
|
||||
}
|
||||
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "github-release-to-discord",
|
||||
"version": "1.10.0",
|
||||
"version": "1.12.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "github-release-to-discord",
|
||||
"version": "1.10.0",
|
||||
"version": "1.12.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.9.1",
|
||||
|
||||
+20
-5
@@ -1,14 +1,29 @@
|
||||
{
|
||||
"name": "github-release-to-discord",
|
||||
"version": "1.10.0",
|
||||
"description": "",
|
||||
"version": "1.12.0",
|
||||
"description": "Github Action that parses a release and sends it to a Discord channel",
|
||||
"type": "module",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"keywords": [
|
||||
"discord",
|
||||
"github",
|
||||
"release",
|
||||
"action",
|
||||
"release-to-discord",
|
||||
"github-release-to-discord",
|
||||
"webhook",
|
||||
"github-action",
|
||||
"changelog"
|
||||
],
|
||||
"author": "SethCohen",
|
||||
"bugs": {
|
||||
"url": "https://github.com/SethCohen/github-release-to-discord/issues"
|
||||
},
|
||||
"homepage": "https://github.com/SethCohen/github-release-to-discord#readme",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.9.1",
|
||||
"@actions/github": "^5.0.3",
|
||||
|
||||
Reference in New Issue
Block a user