{"id":13832785,"url":"https://github.com/theborakompanioni/nostr-action","last_synced_at":"2025-04-12T08:18:36.595Z","repository":{"id":37819904,"uuid":"453168175","full_name":"theborakompanioni/nostr-action","owner":"theborakompanioni","description":"Send Nostr Events from GitHub Workflows","archived":false,"fork":false,"pushed_at":"2025-04-07T10:54:28.000Z","size":1183,"stargazers_count":13,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T08:18:27.734Z","etag":null,"topics":["github-actions","nostr"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/nostr-send-event-action","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theborakompanioni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-01-28T18:04:42.000Z","updated_at":"2025-03-24T19:02:51.000Z","dependencies_parsed_at":"2024-01-13T16:32:02.303Z","dependency_job_id":"92762695-59a7-4de4-9be7-b9819a7aa057","html_url":"https://github.com/theborakompanioni/nostr-action","commit_stats":{"total_commits":29,"total_committers":3,"mean_commits":9.666666666666666,"dds":"0.10344827586206895","last_synced_commit":"51b385a4bd5ed2bde5041f61b78139c99ed99743"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":"actions/javascript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theborakompanioni%2Fnostr-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theborakompanioni%2Fnostr-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theborakompanioni%2Fnostr-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theborakompanioni%2Fnostr-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theborakompanioni","download_url":"https://codeload.github.com/theborakompanioni/nostr-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248537192,"owners_count":21120711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-actions","nostr"],"created_at":"2024-08-04T11:00:30.695Z","updated_at":"2025-04-12T08:18:36.589Z","avatar_url":"https://github.com/theborakompanioni.png","language":"JavaScript","funding_links":[],"categories":["Install from Source","Tools"],"sub_categories":["Nostr","Client reviews and/or comparisons"],"readme":"[![GitHub Release](https://img.shields.io/github/v/release/theborakompanioni/nostr-action?cacheSeconds=3600)](https://github.com/theborakompanioni/nostr-action/releases/latest)\n[![Run Unit Tests](https://github.com/theborakompanioni/nostr-action/actions/workflows/test.yml/badge.svg)](https://github.com/theborakompanioni/nostr-action/actions/workflows/test.yml)\n\n# nostr GitHub Action\n\nUse this action to send events with [Nostr](https://github.com/nostr-protocol/nostr). :rocket:\n\n[See the actions tab](https://github.com/theborakompanioni/nostr-action/actions) for runs of this action.\n\n## Usage\n\n```yaml\nuses: theborakompanioni/nostr-action@v1\nwith:\n  key: ${{ secrets.NOSTR_KEY }}\n  relay: wss://nostr-dev.wellorder.net\n  content: Hello World\n```\n\nThis will create and publish an event like the following:\n```json\n{\n  \"id\": \"e32f2696b5cfb0c2d0def7c78206421f89560547eaeee2f9f4ef8b802633d289\",\n  \"pubkey\": \"17d188313f254d320183aab21c4ec7354ebad1e2435799431962e6118a56eff4\",\n  \"kind\": 1,\n  \"created_at\": 1740648622,\n  \"tags\": [],\n  \"content\": \"Hello World\",\n  \"sig\": \"4c41949bf08c081427e2f8322b55fd1ea4432c663bb1cd10bcbdd9f013d51a66544666e2abb7cdb51b3bad6b48ef8ebc41ccf345982f6fefe22cc956cc29ef09\"\n}\n```\n\nExample debug output:\n```\n::debug::Creating event..\n::debug::Signing event..\n::debug::Validating event..\n::debug::Sending event..\n::debug::Connecting to relay wss://nostr-dev.wellorder.net..\n::debug::Successfully connected to relay wss://nostr-dev.wellorder.net\n::debug::Disconnecting from relay wss://nostr-dev.wellorder.net..\n::debug::Disconnected from relay wss://nostr-dev.wellorder.net\n::debug::Successfully sent event.\n\n::set-output name=event::{\"kind\":1,\"tags\":[],\"created_at\":1740648622,\"content\":\"Hello World\",\"pubkey\":\"17d188313f254d320183aab21c4ec7354ebad1e2435799431962e6118a56eff4\",\"id\":\"e32f2696b5cfb0c2d0def7c78206421f89560547eaeee2f9f4ef8b802633d289\",\"sig\":\"4c41949bf08c081427e2f8322b55fd1ea4432c663bb1cd10bcbdd9f013d51a66544666e2abb7cdb51b3bad6b48ef8ebc41ccf345982f6fefe22cc956cc29ef09\"}\n```\n\n### Custom event template\n\n```yaml\nuses: theborakompanioni/nostr-action@v1\nwith:\n  key: ${{ secrets.NOSTR_KEY }}\n  relay: wss://nostr-dev.wellorder.net\n  content: Hello World\n  event_template: |\n    {\n      \"kind\": 42,\n      \"created_at\": 1500000000,\n      \"tags\": [ [\"expiration\", \"1600000000\"] ]\n    }\n```\n\n```json\n{\n  \"id\": \"59d4a413b08126cbe5b61a9e01bfcb1277b4c765c167a0daac77288c657270a1\",\n  \"pubkey\": \"17d188313f254d320183aab21c4ec7354ebad1e2435799431962e6118a56eff4\",\n  \"kind\": 42,\n  \"created_at\": 1500000000,\n  \"tags\": [\n    [\n      \"expiration\",\n      \"1600000000\"\n    ]\n  ],\n  \"content\": \"Hello World\",\n  \"sig\": \"cc3be9bef353e480f45b2d4efadb902b1b4932f9f1d27219ab462869a0e5487d5aa6eabd7327f5da325ac9bd7a562a29a448b1a9e65ee318e05054126d22bb7e\"\n}\n```\n\n## Development\n### Package for distribution\n\nGitHub Actions will run the entry point from the action.yml. \n\n```bash\nnpm run build\n```\nPackaging the action will create a packaged action in the dist folder.\n\n### Create a new release\n```bash\ngit tag --annotate --sign v1.x.x --message \"Release v1.x.x\"\ngit tag --force --annotate --sign v1 --message \"Update v1 tag\"\ngit push --tags\n``` \n\nSee the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md).\n\n### Helper\n\n#### Generate Nostr key pair\n```\n\u003e npm run generate-key\nPrivate key: 3ddd5602285899a946114506157c7997e5444528f3003f6134712147db19b678\nPublic key: 17d188313f254d320183aab21c4ec7354ebad1e2435799431962e6118a56eff4\n```\n\n#### Publish example event\nSend an example event via Nostr (dry-run by default)\n\n```\n\u003e npm run example\n```\n```\ndry-run enabled - connection to relays will be established, but no event will be sent.\n::debug::Creating event..\n::debug::Signing event..\n::debug::Validating event..\n::debug::Sending event..\n::debug::Connecting to relay wss://nostr-dev.wellorder.net..\n::debug::Successfully connected to relay wss://nostr-dev.wellorder.net\n::debug::Disconnecting from relay wss://nostr-dev.wellorder.net..\n::debug::Disconnected from relay wss://nostr-dev.wellorder.net\n::debug::Successfully sent event.\n[...]\n```\n\n## Resources\n- Nostr (GitHub): https://github.com/nostr-protocol/nostr\n- JavaScript GitHub Action (GitHub): https://github.com/actions/javascript-action\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheborakompanioni%2Fnostr-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheborakompanioni%2Fnostr-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheborakompanioni%2Fnostr-action/lists"}