-
-
Notifications
You must be signed in to change notification settings - Fork 24
71 lines (68 loc) · 2.49 KB
/
release-please.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: release-please
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
id-token: write
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
html_url: ${{ steps.release.outputs.html_url }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
package-name: '@eslint/config-inspector'
pull-request-title-pattern: 'chore: release ${version}'
changelog-types: >
[
{ "type": "feat", "section": "Features", "hidden": false },
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
{ "type": "perf", "section": "Performance Improvements", "hidden": false }
]
publish-npm:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: https://registry.npmjs.org
- uses: pnpm/action-setup@v2
- run: pnpm install
- run: pnpm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
notify-twitter:
runs-on: ubuntu-latest
needs:
- release-please
- publish-npm
if: ${{ needs.release-please.outputs.release_created }}
steps:
- run: 'npx @humanwhocodes/tweet "@eslint/config-inspector ${{ needs.release-please.outputs.tag_name }} has been released: ${{ needs.release-please.outputs.html_url }}"'
env:
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
TWITTER_ACCESS_TOKEN_KEY: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
notify-mastodon:
runs-on: ubuntu-latest
needs:
- release-please
- publish-npm
if: ${{ needs.release-please.outputs.release_created }}
steps:
- run: 'npx @humanwhocodes/toot "@eslint/config-inspector ${{ needs.release-please.outputs.tag_name }} has been released: ${{ needs.release-please.outputs.html_url }}"'
env:
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
MASTODON_HOST: ${{ secrets.MASTODON_HOST }}