Skip to content

Commit f08e030

Browse files
authored
fix(workflow): 💚 updated publish workflow and created release tweet workflow (#123)
* fix(workflow): 💚 updated publish workflow and created release tweet workflow * fix(website): 💄 updated product hunt image on home page
1 parent 1750a34 commit f08e030

File tree

7 files changed

+288
-218
lines changed

7 files changed

+288
-218
lines changed

‎.github/workflows/publish.yml‎

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,14 @@ env:
1919
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
2020
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
2121
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
22-
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
23-
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
24-
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
25-
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
2622

2723
jobs:
2824
prepare-release:
2925
runs-on: ubuntu-latest
3026

3127
outputs:
3228
new-version: ${{ steps.version.outputs.version }}
33-
changelog: ${{ steps.changelog.outputs.changelog }}
29+
previous-version: ${{ steps.version.outputs.previous_version }}
3430

3531
steps:
3632
- name: Check out Git repository
@@ -72,12 +68,6 @@ jobs:
7268
- name: Update the new version to main package.json
7369
run: yarn version ${{ steps.version.outputs.version }}
7470

75-
- name: Create GitHub Release changelog
76-
id: changelog
77-
run: |
78-
export CHANGELOG=$(yarn changelog --from ${{ steps.old_version.outputs.previous_version }} --next-version ${{ steps.version.outputs.version }})
79-
echo "::set-output name=changelog::$CHANGELOG"
80-
8171
- name: Upload updated package.json to artifacts
8272
uses: actions/upload-artifact@v3
8373
with:
@@ -248,7 +238,10 @@ jobs:
248238
core-java/pom.xml
249239
package.json
250240
website/package.json
251-
message: 'chore(Internal): 🎉 Released latest version to Maven central [skip ci]'
241+
message: |
242+
chore(Internal): :bookmark: released latest version to maven central
243+
244+
[skip ci]
252245
push: true
253246
default_author: user_info
254247
commit: --no-verify
@@ -261,7 +254,7 @@ jobs:
261254
default_author: user_info
262255
push: true
263256

264-
github-release-tweet:
257+
github-release:
265258
runs-on: ubuntu-latest
266259
needs:
267260
- prepare-release
@@ -271,14 +264,22 @@ jobs:
271264
- name: Check out Git repository
272265
uses: actions/checkout@v3
273266

267+
- name: Setup Node v16
268+
uses: actions/setup-node@v3
269+
with:
270+
node-version: '16'
271+
cache: 'yarn'
272+
274273
- name: Download target folder
275274
uses: actions/download-artifact@v3
276275
with:
277276
name: target
278277

278+
- name: Generate Change log
279+
run: echo $(yarn changelog --from v${{ needs.prepare-release.outputs.previous-version }} --next-version v${{ needs.prepare-release.outputs.new-version }}) >> CURRENT_CHANGELOG.md
280+
279281
- name: Create GitHub Release
280282
uses: softprops/action-gh-release@v1
281-
id: gh-release
282283
env:
283284
GITHUB_TOKEN: ${{ github.token }}
284285
GITHUB_REPOSITORY: ${{ github.repository }}
@@ -287,19 +288,9 @@ jobs:
287288
name: Version ${{ needs.prepare-release.outputs.new-version }}
288289
prerelease: false
289290
draft: false
290-
body: ${{ needs.prepare-release.outputs.changelog }}
291+
body_path: CURRENT_CHANGELOG.md
291292
discussion_category_name: Announcements
292293
generate_release_notes: false
293294
files: |
294295
core-java/target/*.jar
295296
core-java/target/*.pom
296-
297-
- name: Send Release Tweet
298-
uses: ethomson/send-tweet-action@v1
299-
with:
300-
status: |
301-
🎊 ✨ Released v${{ needs.prepare-release.outputs.new-version }} for #BoykaFramework\n\nCheck it out at ${{ steps.gh-release.outputs.url }}
302-
consumer-key: ${{ env.TWITTER_CONSUMER_API_KEY }}
303-
consumer-secret: ${{ env.TWITTER_CONSUMER_API_SECRET }}
304-
access-token: ${{ env.TWITTER_ACCESS_TOKEN }}
305-
access-token-secret: ${{ env.TWITTER_ACCESS_TOKEN_SECRET }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Tweet Release
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
tweet:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: Eomm/why-don-t-you-tweet@v1
13+
if: ${{ !github.event.repository.private }}
14+
with:
15+
tweet-message: |
16+
🎊 ✨ Released ${{ github.event.release.tag_name }} for #BoykaFramework
17+
18+
Check it out at ${{ github.event.release.html_url }}
19+
env:
20+
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
21+
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
22+
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
23+
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"@typescript-eslint/eslint-plugin": "^5.31.0",
3737
"@typescript-eslint/parser": "^5.31.0",
3838
"commitlint": "^17.0.3",
39-
"eslint": "^8.20.0",
39+
"eslint": "^8.21.0",
4040
"eslint-config-google": "^0.14.0",
4141
"eslint-config-prettier": "^8.5.0",
4242
"eslint-import-resolver-typescript": "^3.3.0",

‎website/package.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"typecheck": "tsc"
1616
},
1717
"dependencies": {
18-
"@docusaurus/core": "2.0.0-rc.1",
19-
"@docusaurus/preset-classic": "2.0.0-rc.1",
18+
"@docusaurus/core": "2.0.1",
19+
"@docusaurus/preset-classic": "2.0.1",
2020
"@mdx-js/react": "^1.6.22",
2121
"clsx": "^1.2.1",
2222
"prism-react-renderer": "^1.3.5",
@@ -25,8 +25,8 @@
2525
"react-github-btn": "^1.3.0"
2626
},
2727
"devDependencies": {
28-
"@docusaurus/module-type-aliases": "2.0.0-rc.1",
29-
"@docusaurus/plugin-content-docs": "^2.0.0-rc.1",
28+
"@docusaurus/module-type-aliases": "2.0.1",
29+
"@docusaurus/plugin-content-docs": "^2.0.1",
3030
"@tsconfig/docusaurus": "^1.0.6",
3131
"react-typist": "^2.0.5"
3232
},

‎website/src/components/PageHero/index.tsx‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@ const HeroContent = ({ title, tagLine }): JSX.Element => {
1212
<Typist avgTypingDelay={40} cursor={{ hideWhenDone: true, show: false }}>
1313
<p className={styles.HeroDescription}>{tagLine}</p>
1414
</Typist>
15+
<a
16+
// eslint-disable-next-line max-len
17+
href='https://www.producthunt.com/posts/boyka-framework?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-boyka&#0045;framework'
18+
target='_blank'
19+
rel='noreferrer'
20+
>
21+
<img
22+
// eslint-disable-next-line max-len
23+
src='https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=352770&theme=light'
24+
alt='Boyka Framework'
25+
width='245'
26+
height='45'
27+
/>
28+
</a>
1529
</div>
1630
);
1731
};

‎website/src/data/home-page.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
"userId": "WasiqBhamla",
4444
"repoName": "boyka-framework",
4545
"type": "Fork"
46+
},
47+
{
48+
"id": 4,
49+
"userId": "WasiqB"
4650
}
4751
],
4852
"features": [

0 commit comments

Comments
 (0)