Skip to content
This repository was archived by the owner on Aug 20, 2024. It is now read-only.

Commit a7fb4c7

Browse files
mdjermanovicnzakas
andauthored
chore: set up release-please (#48)
* chore: set up release-please * Update .github/workflows/release-please.yml Co-authored-by: Nicholas C. Zakas <[email protected]> --------- Co-authored-by: Nicholas C. Zakas <[email protected]>
1 parent 7bd1fc1 commit a7fb4c7

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/release-please.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
name: release-please
6+
jobs:
7+
release-please:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
steps:
13+
- uses: google-github-actions/release-please-action@v3
14+
id: release
15+
with:
16+
release-type: node
17+
package-name: 'eslint-visitor-keys'
18+
pull-request-title-pattern: 'chore: release ${version}'
19+
changelog-types: >
20+
[
21+
{ "type": "feat", "section": "Features", "hidden": false },
22+
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
23+
{ "type": "docs", "section": "Documentation", "hidden": false },
24+
{ "type": "build", "section": "Build Related", "hidden": false },
25+
{ "type": "chore", "section": "Chores", "hidden": false },
26+
{ "type": "perf", "section": "Chores", "hidden": false },
27+
{ "type": "ci", "section": "Chores", "hidden": false },
28+
{ "type": "refactor", "section": "Chores", "hidden": false },
29+
{ "type": "test", "section": "Chores", "hidden": false }
30+
]
31+
- uses: actions/checkout@v3
32+
if: ${{ steps.release.outputs.release_created }}
33+
- uses: actions/setup-node@v3
34+
with:
35+
node-version: lts/*
36+
registry-url: https://registry.npmjs.org
37+
if: ${{ steps.release.outputs.release_created }}
38+
- run: npm install
39+
if: ${{ steps.release.outputs.release_created }}
40+
- run: npm publish
41+
env:
42+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
43+
if: ${{ steps.release.outputs.release_created }}
44+
- run: 'npx @humanwhocodes/tweet "eslint-visitor-keys ${{ steps.release.outputs.tag_name }} has been released: ${{ steps.release.outputs.html_url }}"'
45+
if: ${{ steps.release.outputs.release_created }}
46+
env:
47+
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
48+
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
49+
TWITTER_ACCESS_TOKEN_KEY: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }}
50+
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
51+
- run: 'npx @humanwhocodes/toot "eslint-visitor-keys ${{ steps.release.outputs.tag_name }} has been released: ${{ steps.release.outputs.html_url }}"'
52+
if: ${{ steps.release.outputs.release_created }}
53+
env:
54+
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
55+
MASTODON_HOST: ${{ secrets.MASTODON_HOST }}

0 commit comments

Comments
 (0)