Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

action-release


Action to derive Nx affected SHAs, warm up the devenv shell (with retries for intermittent store-path flake failures), and run the repository release command.

💻 Visit stormsoftware.com to stay up to date with this developer


Commitizen friendly semantic-release GitHub Workflow Status (with event)

Important

This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be available through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.

Table of Contents


Getting Started

Composite GitHub Action that derives Nx affected SHAs, warms up the devenv shell (with retries for intermittent store-path flake failures), and runs the repository release command.

Use after storm-software/action-devenv-setup.

Usage

- name: Setup workspace
  uses: storm-software/action-devenv-setup@main
  with:
    gpg-sign-key: ${{ secrets.STORM_BOT_GPG_SIGN_KEY }}
    gpg-private-key: ${{ secrets.STORM_BOT_GPG_PRIVATE_KEY }}
    gpg-passphrase: ${{ secrets.STORM_BOT_GPG_PASSPHRASE }}
    storm-bot-github-token: ${{ secrets.STORM_BOT_GITHUB_TOKEN }}
    cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}

- name: Release repository updates
  uses: storm-software/action-release@main
  with:
    workflow-id: release.yml
    main-branch-name: main
    devenv-profile: production
    tag: ${{ inputs.tag }}
    env: |
      {
        "GITHUB_ACTOR": "${{ github.actor }}",
        "GITHUB_REPOSITORY": "${{ github.repository }}",
        "GITHUB_TOKEN": "${{ github.token }}",
        "STORM_BOT_GITHUB_TOKEN": "${{ secrets.STORM_BOT_GITHUB_TOKEN }}",
        "STORM_WORKSPACE_ROOT": "${{ github.workspace }}",
        "STORM_REPOSITORY": "${{ github.repositoryUrl }}",
        "NPM_TOKEN": "${{ secrets.STORM_BOT_NPM_TOKEN }}",
        "CLOUDFLARE_API_TOKEN": "${{ secrets.STORM_BOT_CLOUDFLARE_TOKEN }}"
      }

Custom environment variables

Pass per-repo secrets and vars in either (or both) of these ways:

  1. env input (JSON) — applied only to the release step. Prefer this for release-only credentials that differ across repositories.
  2. Step-level env: on uses: — inherited by all composite steps (SHA derivation, warm-up, and release).
- uses: storm-software/action-release@main
  with:
    env: |
      {
        "NPM_TOKEN": "${{ secrets.STORM_BOT_NPM_TOKEN }}",
        "CARGO_REGISTRY_TOKEN": "${{ secrets.STORM_BOT_CARGO_TOKEN }}"
      }
  env:
    CI: true

NX_BASE, NX_HEAD, and TAG are always set on the release step from the derived SHAs and the tag input.

Inputs

Input Default Description
workflow-id release.yml Workflow file for last successful run lookup
main-branch-name main Main branch for Nx affected base
error-on-no-successful-workflow false Fail when no successful workflow is found
devenv-profile production Profile for devenv --profile
tag (empty) Optional tag override (TAG)
release-args (empty) Extra args after base/head SHAs
env {} JSON object of release-step environment variables

Outputs

Output Description
base Base SHA for nx affected / release
head Head SHA for nx affected / release

Environment Configuration Help

If you run into any issues while trying to run any of the above steps, please reach out to Patrick Sullivan. See the Support section for more information.

Build

Run pnpm build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.


Development Server

Run pnpm serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.


Environment Configuration Help

If you run into any issues while trying to run any of the above steps, please reach out to Patrick Sullivan. See the Support section for more information.


Plug-Ins

Some of the plug-ins used by this repository are:


Generate an Application

Run nx g @storm-software/workspace:app my-app to generate an application.

You can use any of the plugins above to generate applications as well.

When using Nx, you can create multiple applications and libraries in the same workspace.


Generate a Library

Run nx g @storm-software/workspace:lib my-lib to generate a library.

You can also use any of the plugins above to generate libraries as well.

Libraries are shareable across libraries and applications. They can be imported from @action-release/my-lib.


Code Scaffolding

Run nx g @nx/react:component my-component --project=action-release to generate a new component.


Testing

Open System uses Jest for unit testing and Cypress for end-to-end testing.


Running Unit Tests

Run pnpm test to execute the unit tests via Jest.

Run pnpm affected:test to execute the unit tests affected by a change.


Running End-to-End Tests

Run pnpm e2e to execute the end-to-end tests via Cypress.

Run pnpm affected:e2e to execute the end-to-end tests affected by a change.


Understand your workspace

Run pnpm graph to see a diagram of the dependencies of the Open System projects.


☁ Nx Cloud

Nx caches the output of any previously run command such as testing and building, so it can replay the cached results instead of rerunning it. Nx Cloud allows you to share the computation cache across everyone in your team and CI.

Nx Cloud - Dashboard

Roadmap

See the open issues for a list of proposed features (and known issues).


Contributing

First off, thanks for taking the time to contribute! Contributions are what makes the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated.

Please try to create bug reports that are:

  • Reproducible. Include steps to reproduce the problem.
  • Specific. Include as much detail as possible: which version, what environment, etc.
  • Unique. Do not duplicate existing opened issues.
  • Scoped to a Single Bug. One bug per report.

Please adhere to this project's code of conduct.

You can use markdownlint-cli to check for common markdown style inconsistency.


Support

Reach out to the maintainer at one of the following places:


License

This project is licensed under the Apache License 2.0. Feel free to edit and distribute this template as you like. If you have any specific questions, please reach out to the Storm Software development team.

See LICENSE for more information.


FOSSA Status


Contributors ✨

Thanks goes to these wonderful people (emoji key):

Patrick Sullivan
Patrick Sullivan

🎨 💻 🔧 📖 ⚠️
Tyler Benning
Tyler Benning

🎨
Stormie
Stormie

🚧
Add your contributions

This project follows the all-contributors specification. Contributions of any kind welcome!




Storm Software

Fingerprint: F47F 1853 BCAD DE9B 42C8 6316 9FDE EC95 47FE D106

Storm Software is an open source software development organization and creator of Acidic, StormStack and StormCloud.

Our mission is to make software development more accessible. Our ideal future is one where anyone can create software without years of prior development experience serving as a barrier to entry. We hope to achieve this via LLMs, Generative AI, and intuitive, high-level data modeling/programming languages.

Join us on Discord to chat with the team, receive release notifications, ask questions, and get involved.

If this sounds interesting, and you would like to help us in creating the next generation of development tools, please reach out on our website or join our Slack channel! If you plan on publishing content that incorporates the Storm Software brand in anyway, please take a quick look at our brand guidelines.



Visit us at stormsoftware.com


About

An action used to release the packages in the monorepo

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors