mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-28 20:39:40 -08:00
chore(social): add card instead of link
This commit is contained in:
parent
b30965aca7
commit
5b51706b7a
31
.github/workflows/social.yml
vendored
31
.github/workflows/social.yml
vendored
|
@ -29,30 +29,31 @@ jobs:
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
import pkg from '@atproto/api';
|
import pkg from '@atproto/api';
|
||||||
const { BskyAgent, RichText } = pkg;
|
const { BskyAgent } = pkg;
|
||||||
|
|
||||||
const agent = new BskyAgent({ service: 'https://bsky.social' })
|
const agent = new BskyAgent({ service: 'https://bsky.social' })
|
||||||
await agent.login({identifier: '${{ secrets.BLUESKY_IDENTIFIER }}', password: '${{ secrets.BLUESKY_PASSWORD }}'})
|
await agent.login({identifier: '${{ secrets.BLUESKY_IDENTIFIER }}', password: '${{ secrets.BLUESKY_PASSWORD }}'})
|
||||||
|
|
||||||
const postBody = `📦 ${{ github.event.release.name }}
|
const version = '${{ github.event.release.name }}';
|
||||||
|
const notes = `${{steps.notes.outputs.result}}`;
|
||||||
|
|
||||||
${{steps.notes.outputs.result}}
|
const text = `📦 ${version}
|
||||||
|
|
||||||
${{ github.event.release.html_url }}
|
${notes}
|
||||||
|
|
||||||
#ohmyposh #oss #cli #opensource`;
|
#ohmyposh #oss #cli #opensource`;
|
||||||
|
|
||||||
const rt = new RichText({text: postBody})
|
await agent.post({
|
||||||
await rt.detectFacets(agent)
|
text: text,
|
||||||
|
embed: {
|
||||||
const post = {
|
$type: 'app.bsky.embed.external',
|
||||||
$type: 'app.bsky.feed.post',
|
external: {
|
||||||
text: rt.text,
|
uri: `https://github.com/JanDeDobbeleer/oh-my-posh/releases/tag/${version}`,
|
||||||
facets: rt.facets,
|
title: "GitHub release",
|
||||||
createdAt: new Date().toISOString()
|
description: version,
|
||||||
}
|
},
|
||||||
|
},
|
||||||
await agent.post(post)
|
});
|
||||||
- name: Toot 🐘
|
- name: Toot 🐘
|
||||||
uses: cbrgm/mastodon-github-action@d98ab3376f941df14d37d5737961de431c0838c6
|
uses: cbrgm/mastodon-github-action@d98ab3376f941df14d37d5737961de431c0838c6
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Reference in a new issue