Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gh-actions-publish-test-abc-123

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gh-actions-publish-test-abc-123

## Summary

  • 2.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Tag, release & publish automation

Summary

This project demonstrates the setup required for tag, release & publish automation.

Development process

  1. Develop on feature branches
  2. Merge to main
  3. Release PR is created automatically and updated as more commits are made on main
  4. Manually merge the PR, which automatically creates the tag and release notes
  5. New version of the package is automatically published to NPM

Solution

Summary

  • All commits on main adhere to Conventional Commits
  • On every push to main GitHub Actions workflows parse those commits then tag, release and publish the package as required

Details

  • Configure a pre-commit hook to enforce commit message syntax

  • Configure GitHub to enforce PR title syntax

  • Create a workflow to automatically create a release PR on push to main

    • https://github.com/google-github-actions/release-please-action

    • Leverages the PR title syntax described above

    • Note: a release PR will only be created for releasable units, which are commits pre-fixed with:

      # minor
      feat:
      
      # patch
      fix:
      perf:
      refactor:
      

      or breaking changes, which include a !:

      # major
      refactor!:
      fix!:
      # etc.
      
  • Extend the workflow to publish to NPM after the release PR has been merged

    • Create a separate action to run npm publish
    • Call this action when the release_created output from release-please-action is true

GitHub settings

  • Give GitHub Actions write access
    • Settings > Actions > General > Workflow permissions
    • Select "Read and write permissions"
    • Select "Allow GitHub Actions to create and approve pull requests"
  • Enforce squashed merges
    • Settings > General > Pull Requests
    • De-select "Allow merge commits"
  • Add branch protection to main
    • Require a pull request before merging
    • Require status checks to pass before merging
      • Search for and select the action associated to the required status
    • Require branches to be up to date before merging
    • Require linear history

FAQs

Package last updated on 04 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc