Skip to content

Commit

Permalink
chore: setup release script
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Mar 29, 2024
1 parent cc4b7a0 commit ec766c5
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 73 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
on:
push:
branches:
- main
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
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": "docs", "section": "Documentation", "hidden": false },
{ "type": "build", "section": "Build Related", "hidden": false },
{ "type": "chore", "section": "Chores", "hidden": false },
{ "type": "perf", "section": "Chores", "hidden": false },
{ "type": "ci", "section": "Chores", "hidden": false },
{ "type": "refactor", "section": "Chores", "hidden": false },
{ "type": "test", "section": "Chores", "hidden": false }
]
- uses: actions/checkout@v3
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v3
with:
node-version: lts/*
registry-url: https://registry.npmjs.org
if: ${{ steps.release.outputs.release_created }}
- run: npm install
if: ${{ steps.release.outputs.release_created }}
- run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: ${{ steps.release.outputs.release_created }}
- run: 'npx @humanwhocodes/tweet "@eslint/config-inspector ${{ steps.release.outputs.tag_name }} has been released: ${{ steps.release.outputs.html_url }}"'
if: ${{ steps.release.outputs.release_created }}
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 }}
- run: 'npx @humanwhocodes/toot "@eslint/config-inspector ${{ steps.release.outputs.tag_name }} has been released: ${{ steps.release.outputs.html_url }}"'
if: ${{ steps.release.outputs.release_created }}
env:
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
MASTODON_HOST: ${{ secrets.MASTODON_HOST }}
29 changes: 0 additions & 29 deletions .github/workflows/release.yml

This file was deleted.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"prepare": "nuxi prepare",
"start": "node bin.mjs",
"prepublishOnly": "nuxi build",
"release": "bumpp && pnpm publish",
"lint": "nuxi prepare && eslint .",
"typecheck": "vue-tsc --noEmit"
},
Expand Down Expand Up @@ -58,7 +57,6 @@
"@unocss/eslint-config": "^0.58.8",
"@unocss/nuxt": "^0.58.8",
"@vueuse/nuxt": "^10.9.0",
"bumpp": "^9.4.0",
"eslint": "^9.0.0-rc.0",
"floating-vue": "^5.2.2",
"fuse.js": "^7.0.0",
Expand Down
42 changes: 0 additions & 42 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ec766c5

Please sign in to comment.