-
-
Notifications
You must be signed in to change notification settings - Fork 51
chore: Set up release-please #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| name: release-please | ||
| jobs: | ||
| release-please: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| steps: | ||
| - uses: google-github-actions/release-please-action@v3 | ||
| id: release | ||
| with: | ||
| release-type: node | ||
| package-name: generator-eslint | ||
| - 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 publish | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't clean up the existing eslint-release dependency and package.json scripts in this PR. I'm happy to include that if you'd like, but I figured we'd like to try release-please first while retaining the option of releasing in Jenkins until we're sure we're ready to drop the Jenkins flow.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That seems reasonable. |
||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| if: ${{ steps.release.outputs.release_created }} | ||
| - run: 'npx @humanwhocodes/tweet "generator-eslint ${{ 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 }} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This repository is currently configured to give workflows write access by default. Specifying only the precise
$GITHUB_TOKENpermissions that release-please needs for this job reduces surface area and makes this workflow copy-pasteable to repositories that only grant read access by default.