Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

This GitHub action automatically creates a release in a PR and, after merging, publishes your package to the supported package registry and notifies you of the release in Slack.

NotificationsYou must be signed in to change notification settings

DXHeroes/gh-action-auto-release

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

GitHub release (with filter)

GH Action Auto Release v1.0.8

Time to implement: 10 minutes.

Saved time: 1 hour per each release of any technology.

This GitHub Action will automatically create a release and publish your package to the supported package registry.

How it works

This action usesrelease-please under the hood. It will create a pull request with the release notes and you can check them before merging.

When you merge the pull request, it will create a release with the release notes from the pull request.

Each release will be tagged with a version from the commit message. You can useconventional commits or just add a version number to the commit message.

Every release will be published to the supported package registry.

You can get your package published in a few minutes and you won't have to worry about it anymore. Just follow the instructions below and you're done.

Supported package types

  • ✅ node
  • ✅ php
  • ✅ ruby

Please request other package types in the issues

  • 🛠️ .NET
  • 🛠️ dart
  • 🛠️ elixir
  • 🛠️ go
  • 🛠️ helm
  • 🛠️ java
  • 🛠️ maven
  • 🛠️ krm-blueprint
  • 🛠️ maven
  • 🛠️ expo
  • 🛠️ ocaml
  • 🛠️ python
  • 🛠️ rust
  • 🛠️ sfdx
  • 🛠️ simple
  • 🛠️ terraform-module

Prerequisites

GitHub Actions

You must allow GitHub actions to create and approve pull requests. You can do this in theorganization or repository settings.

Node.js package

Add these secret to your repository:

  • name:NPM_TOKEN - NPM token with write access to the package.
    • Required permissions for Granular Access Token: Packages and scopes > 'Read and write'.
    • Required permissions for Classic Token: 'Automation'.

PHP package

Add these secrets to your repository:

Ruby package

Add these secret to your repository:

  • name:RUBYGEMS_API_KEY - RubyGems API key with write access to the package.
    • Required scope: 'Push rubygem'.

Usage

Create your GitHub Action

Create a new file in your repository.github/workflows/release.yml with the following content that fits your package type.

For Node.js package

name:Releaseon:push:branches:      -main# set your default branchpermissions:contents:writepull-requests:writejobs:release:name:Release by DX Heroesruns-on:ubuntu-lateststeps:      -uses:actions/checkout@v3      -uses:dxheroes/gh-action-auto-release@v1with:release-type:nodepackage-name:prs-test-js-lib# replace with your package nameenv:NPM_TOKEN:${{ secrets.NPM_TOKEN }}

For PHP package

name:Releaseon:push:branches:      -main# set your default branchpermissions:contents:writepull-requests:writejobs:release:name:Release by DX Heroesruns-on:ubuntu-lateststeps:      -uses:actions/checkout@v3      -uses:dxheroes/gh-action-auto-release@v1with:release-type:phppackage-name:prs-test-php-libenv:PACKAGIST_USERNAME:${{ secrets.PACKAGIST_USERNAME }}PACKAGIST_TOKEN:${{ secrets.PACKAGIST_TOKEN }}

For Ruby package

name:Releaseon:push:branches:      -main# set your default branchpermissions:contents:writepull-requests:writejobs:release:name:Release by DX Heroesruns-on:ubuntu-lateststeps:      -uses:actions/checkout@v3      -uses:dxheroes/gh-action-auto-release@v1with:release-type:rubypackage-name:prs-test-ruby-libenv:RUBYGEMS_API_KEY:${{ secrets.RUBYGEMS_API_KEY }}

Advanced usage

Arguments for the action

  • release-type - Type of the release. Default:node
  • package-name - Name of the package. Required.
  • You can also set otherrelease-please arguments. Seerelease-please documentation for more information.

Get notified about new releases

Slack

Just add this env variable to your workflow:

env:SLACK_WEBHOOK_URL:${{ secrets.SLACK_WEBHOOK_URL }}

Please request other platforms in the issues

Example of setting up Slack notifications for node.js package:

name:Releaseon:push:branches:      -main# set your default branchpermissions:contents:writepull-requests:writejobs:release:name:Release by DX Heroesruns-on:ubuntu-lateststeps:      -uses:actions/checkout@v3      -uses:dxheroes/gh-action-auto-release@v1with:release-type:nodepackage-name:prs-test-js-lib# replace with your package nameenv:NPM_TOKEN:${{ secrets.NPM_TOKEN }}SLACK_WEBHOOK_URL:${{ secrets.SLACK_WEBHOOK_URL }}## Configure SLACK_WEBHOOK_URL

Customize package path when using monorepo or is not in the root directory

Setworking-directory to the path of the package. For example:

name:Releaseon:push:branches:      -main# set your default branchpermissions:contents:writepull-requests:writejobs:release:name:Release by DX Heroesruns-on:ubuntu-latestdefaults:run:working-directory:libraries/js-lib# replace with your package pathsteps:# ...

Contributing

All contributions are welcome. Please create an issue or submit a pull request.

About

This GitHub action automatically creates a release in a PR and, after merging, publishes your package to the supported package registry and notifies you of the release in Slack.

Topics

Resources

Stars

Watchers

Forks

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp