You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And you're done! Whenever you create a new release, the workflow should run and, if properly setup, post to your specified Discord channel.
82
+
83
+
## Contributing
84
+
85
+
If you have suggestions for how GitHub Releases To Discord Action could be improved, or want to report a bug, open an issue! We'd love all and any contributions.
4. Create a sample test Release file to simulate a webhook payload object such as `tests/sample-test-release.json` with the following structure:
91
+
92
+
```json
93
+
{
94
+
"action": "published",
95
+
"release": {
96
+
...
97
+
},
98
+
"repository": {
99
+
...
100
+
},
101
+
"sender": {
102
+
...
103
+
}
104
+
}
105
+
```
106
+
107
+
This file will be used to test the action locally and simulate a real release event webhook payload. Refer to the [GitHub Webhook documentation](https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=published#release) and the [Github API Documentation](https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#get-a-release) for more information on the webhook payload structure.
108
+
109
+
6. Fill the test json file with the necessary fields to simulate a release event.
110
+
111
+
5. Create a test file called `.env` in the main root of the project with the following environmental variables:
112
+
113
+
```bash
114
+
INPUT_WEBHOOK_URL=
115
+
INPUT_COLOR=
116
+
INPUT_USERNAME=
117
+
INPUT_AVATAR_URL=
118
+
INPUT_CONTENT=
119
+
INPUT_FOOTER_TITLE=
120
+
INPUT_FOOTER_ICON_URL=
121
+
INPUT_FOOTER_TIMESTAMP=
122
+
INPUT_MAX_DESCRIPTION=
123
+
INPUT_REDUCE_HEADINGS=
124
+
```
125
+
126
+
8. Fill the `.env` file with your chosen environmental variables values.
127
+
9. Create a Discord webhook in your server, making sure to add the webhook url to the `.env` file under `INPUT_WEBHOOK_URL=`.
128
+
10. Run the action locally with `act release -e <your.json>` (e.g. `act release -e tests/sample-test-release.json`) and check the output in your Discord server.
129
+
11. Confirm that the action works as expected.
130
+
12. Make your changes and commit them: `git commit -m '<commit_message>'`. Please follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
0 commit comments