Giter Club home page Giter Club logo

gh-actions-example's Introduction

gh-actions-example

This repository serves as an example on:

  • How to configure a workflow which notifies Slack, builds and publishes a Docker image, and automatically versions the repo
  • How to configure semantic versioning using semantic-release, commitlint, and husky

How to Use This Repository

This repository can be used to experiment with the automated semantic versioning and get familiar with it. The repository MUST be returned back to a working state once done testing.

  1. Install dependencies

    # If you use yarn
    yarn
    
    # If you use npm
    npm i
  2. Make a minor change and commit it to this repo with a message which follows Conventional Commits. The commit message and TYPE can be whatever you'd like. Push to master when done.

  3. View the running action here.

  4. Generated release notes can be found here and here.

Configure a Repo with Automatic Semantic Versioning

In order to configure a Git repo with automatic semantic versioning, follow the steps below:

  1. Clone the project

  2. Create a package.json file

  3. Copy the commitlint, husky, and release configuration blocks found in the example package.json to the package.json in your project.

  4. Run the following to install the commitlint and husky packages locally and save them as development dependencies to the package.json

    • Only commitlint and husky need to be installed locally, semantic-release does not since it'll only be used by Github Actions.
    • Upon installation of husky, it will attempt to create a pre-commit hook in your git repo
    • If you see errors, resolve them then try re-installing.
    # If you use yarn
    yarn add --dev husky @commitlint/{config-conventional,cli} --force
    
    # If you use npm
    npm i --save-dev husky @commitlint/{config-conventional,cli}
  5. Activate hooks

    # If you use yarn
    yarn husky install
    
    # If you use npm
    npx husky install
  6. Add hook

    npx husky add .husky/commit-msg 'npx --no-install commitlint --edit'
  7. Optional: Add the following files/dirs to the .gitignore file:

    echo -e "**/node_modules" >> .gitignore
  8. Add a Github Actions workflow to .github/workflows/

  9. Commit all new files/modifications (except for anything being ignored)

    • Upon commit, you should see a pre-commit hook fire which runs commitlint and checks your commit message. Your message must conform to Conventional Commits, otherwise it will be denied by commitlint. If this does not happen or an error occurs, resolve the error then try again.

Going forward, anyone who wishes to commit to your repository will need to run the following command beforehand to install local dev dependencies. It should be quick and only take a few seconds:

    # If you use yarn
    yarn

    # If you use npm
    npm i

gh-actions-example's People

Contributors

blockstack-devops avatar charliec3 avatar semantic-release-bot avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

charliec3

gh-actions-example's Issues

Publish Firefox Extension

  1. Add "Version notes" with the same content as found in the CHANGELOG.md file for the release.
  2. Add the following for "Notes for Reviewers":
    Please use this command to build the extension with Docker:
    docker build -f Dockerfile -t stacks-wallet-web . && docker run -d --name stacks-wallet-web stacks-wallet-web && docker cp stacks-wallet-web:stacks-wallet-chromium.zip . && docker rm -f stacks-wallet-web
    You can test the extension by selecting "Get started" on https://boom.money.
  3. Download the ZIP file of the repository's main branch and upload to "Source code".
  4. Submit by clicking "Save changes".

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No name for the package defined.

A name for the package must be created. Run through npm (npm run to use npm package name or define packageName in the plugin config or SEMANTIC_RELEASE_PACKAGE in the environment


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Invalid npm token.

The npm token configured in the NPM_TOKEN environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org/.

If you are using Two-Factor Authentication, make configure the auth-only level is supported. semantic-release cannot publish with the default auth-and-writes level.

Please make sure to set the NPM_TOKEN environment variable in your CI with the exact value of the npm token.


Invalid npm token.

The npm token configured in the NPM_TOKEN environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org/.

If you are using Two-Factor Authentication, make configure the auth-only level is supported. semantic-release cannot publish with the default auth-and-writes level.

Please make sure to set the NPM_TOKEN environment variable in your CI with the exact value of the npm token.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Publish Firefox Extension

  1. Add "Version notes" with the same content as found in the CHANGELOG.md file for the release.
  2. Add the following for "Notes for Reviewers":
    Please use this command to build the extension with Docker:
    docker build -f Dockerfile -t stacks-wallet-web . && docker run -d --name stacks-wallet-web stacks-wallet-web && docker cp stacks-wallet-web:stacks-wallet-chromium.zip . && docker rm -f stacks-wallet-web
    You can test the extension by selecting "Get started" on https://boom.money.
  3. Download the ZIP file of the repository's main branch and upload to "Source code".
  4. Submit by clicking "Save changes".

Publish Firefox Extension

  1. Add "Version notes" with the same content as found in the CHANGELOG.md file for the release.
  2. Add the following for "Notes for Reviewers":
    Please use this command to build the extension with Docker:
    docker build -f Dockerfile -t stacks-wallet-web . && docker run -d --name stacks-wallet-web stacks-wallet-web && docker cp stacks-wallet-web:stacks-wallet-chromium.zip . && docker rm -f stacks-wallet-web
    You can test the extension by selecting "Get started" on https://boom.money.
  3. Download the ZIP file of the repository's main branch and upload to "Source code".
  4. Submit by clicking "Save changes".

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Missing name property in package.json.

The package.json's name property is required in order to publish a package to the npm registry.

Please make sure to add a valid name for your package in your package.json.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Publish Firefox Extension

  1. Add "Version notes" with the same content as found in the CHANGELOG.md file for the release.
  2. Add the following for "Notes for Reviewers":
    Please use this command to build the extension with Docker:
    docker build -f Dockerfile -t stacks-wallet-web . && docker run -d --name stacks-wallet-web stacks-wallet-web && docker cp stacks-wallet-web:stacks-wallet-chromium.zip . && docker rm -f stacks-wallet-web
    You can test the extension by selecting "Get started" on https://boom.money.
  3. Download the ZIP file of the repository's main branch and upload to "Source code".
  4. Submit by clicking "Save changes".

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No name for the package defined.

A name for the package must be created. Run through npm (npm run to use npm package name or define packageName in the plugin config or SEMANTIC_RELEASE_PACKAGE in the environment


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Missing package.json file.

A package.json file at the root of your project is required to release on npm.

Please follow the npm guideline to create a valid package.json file.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Publish Firefox Extension

  1. Add "Version notes" with the same content as found in the CHANGELOG.md file for the release.
  2. Add the following for "Notes for Reviewers":
    Please use this command to build the extension with Docker:
    docker build -f Dockerfile -t stacks-wallet-web . && docker run -d --name stacks-wallet-web stacks-wallet-web && docker cp stacks-wallet-web:stacks-wallet-chromium.zip . && docker rm -f stacks-wallet-web
    You can test the extension by selecting "Get started" on https://boom.money.
  3. Download the ZIP file of the repository's main branch and upload to "Source code".
  4. Submit by clicking "Save changes".

Publish Firefox Extension

  1. Add "Version notes" with the same content as found in the CHANGELOG.md file for the release.
  2. Add the following for "Notes for Reviewers":
    Please use this command to build the extension with Docker:
        docker build -f Dockerfile -t stacks-wallet-web . \
        && docker run -d --name stacks-wallet-web stacks-wallet-web \
        && docker cp stacks-wallet-web:stacks-wallet-chromium.zip . \
        && docker rm -f stacks-wallet-web
    
    You can test the extension by selecting "Get started" on https://boom.money.
  3. Download the ZIP file of the repository main branch and upload to "Source code".
  4. Submit by clicking "Save changes".

Publish Firefox Extension

  1. Add "Version notes" with the same content as found in the CHANGELOG.md file for the release.
  2. Add the following for "Notes for Reviewers":
    Please use this command to build the extension with Docker:
        docker build -f Dockerfile -t stacks-wallet-web . \
        && docker run -d --name stacks-wallet-web stacks-wallet-web \
        && docker cp stacks-wallet-web:stacks-wallet-chromium.zip . \
        && docker rm -f stacks-wallet-web
    
    You can test the extension by selecting "Get started" on https://boom.money.
  3. Download the ZIP file of the repository main branch and upload to "Source code".
  4. Submit by clicking "Save changes".

Publish Firefox Extension

  1. Add "Version notes" with the same content as found in the CHANGELOG.md file for the release.
  2. Add the following for "Notes for Reviewers":
    Please use this command to build the extension with Docker:
        docker build -f Dockerfile -t stacks-wallet-web . \
        && docker run -d --name stacks-wallet-web stacks-wallet-web \
        && docker cp stacks-wallet-web:stacks-wallet-chromium.zip . \
        && docker rm -f stacks-wallet-web
    
    You can test the extension by selecting "Get started" on https://boom.money.
  3. Download the ZIP file of the repository main branch and upload to "Source code".
  4. Submit by clicking "Save changes".

Publish Firefox Extension

  1. Add "Version notes" with the same content as found in the CHANGELOG.md file for the release.
  2. Add the following for "Notes for Reviewers":
    Please use this command to build the extension with Docker:
    docker build -f Dockerfile -t stacks-wallet-web . && docker run -d --name stacks-wallet-web stacks-wallet-web && docker cp stacks-wallet-web:stacks-wallet-chromium.zip . && docker rm -f stacks-wallet-web
    You can test the extension by selecting "Get started" on https://boom.money.
  3. Download the ZIP file of the repository's main branch and upload to "Source code".
  4. Submit by clicking "Save changes".

Publish Firefox Extension

  1. Add "Version notes" with the same content as found in the CHANGELOG.md file for the release.
  2. Add the following for "Notes for Reviewers":
    Please use this command to build the extension with Docker:
    docker build -f Dockerfile -t stacks-wallet-web .
    && docker run -d --name stacks-wallet-web stacks-wallet-web
    && docker cp stacks-wallet-web:stacks-wallet-chromium.zip .
    && docker rm -f stacks-wallet-web
    You can test the extension by selecting "Get started" on https://boom.money.
  3. Download the ZIP file of the repository main branch and upload to "Source code".
  4. Submit by clicking "Save changes".

Publish Firefox Extension

  1. Add "Version notes" with the same content as found in the CHANGELOG.md file for the release.
  2. Add the following for "Notes for Reviewers":
    Please use this command to build the extension with Docker:
        docker build -f Dockerfile -t stacks-wallet-web . \
        && docker run -d --name stacks-wallet-web stacks-wallet-web \
        && docker cp stacks-wallet-web:stacks-wallet-chromium.zip . \
        && docker rm -f stacks-wallet-web
    
    You can test the extension by selecting "Get started" on https://boom.money.
  3. Download the ZIP file of the repository main branch and upload to "Source code".
  4. Submit by clicking "Save changes".

Publish Firefox Extension

  1. Add "Version notes" with the same content as found in the CHANGELOG.md file for the release.
  2. Add the following for "Notes for Reviewers":
    Please use this command to build the extension with Docker:
    docker build -f Dockerfile -t stacks-wallet-web . && docker run -d --name stacks-wallet-web stacks-wallet-web && docker cp stacks-wallet-web:stacks-wallet-chromium.zip . && docker rm -f stacks-wallet-web
    You can test the extension by selecting "Get started" on https://boom.money.
  3. Download the ZIP file of the repository's main branch and upload to "Source code".
  4. Submit by clicking "Save changes".

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No name for the package defined.

A name for the package must be created. Run through npm (npm run to use npm package name or define packageName in the plugin config or SEMANTIC_RELEASE_PACKAGE in the environment


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Publish Firefox Extension

  1. Add "Version notes" with the same content as found in the CHANGELOG.md file for the release.
  2. Add the following for "Notes for Reviewers":
    Please use this command to build the extension with Docker:
    docker build -f Dockerfile -t stacks-wallet-web . && docker run -d --name stacks-wallet-web stacks-wallet-web && docker cp stacks-wallet-web:stacks-wallet-chromium.zip . && docker rm -f stacks-wallet-web
    You can test the extension by selecting "Get started" on https://boom.money.
  3. Download the ZIP file of the repository's main branch and upload to "Source code".
  4. Submit by clicking "Save changes".

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Missing package.json file.

A package.json file at the root of your project is required to release on npm.

Please follow the npm guideline to create a valid package.json file.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Publish Firefox Extension

  1. Add "Version notes" with the same content as found in the CHANGELOG.md file for the release.
  2. Add the following for "Notes for Reviewers":
    Please use this command to build the extension with Docker:
    docker build -f Dockerfile -t stacks-wallet-web . && docker run -d --name stacks-wallet-web stacks-wallet-web && docker cp stacks-wallet-web:stacks-wallet-chromium.zip . && docker rm -f stacks-wallet-web
    You can test the extension by selecting "Get started" on https://boom.money.
  3. Download the ZIP file of the repository's main branch and upload to "Source code".
  4. Submit by clicking "Save changes".

Publish Firefox Extension2

  1. Add "Version notes" with the same content as found in the CHANGELOG.md file for the release.
  2. Add the following for "Notes for Reviewers":
    Please use this command to build the extension with Docker:
        docker build -f Dockerfile -t stacks-wallet-web . \
        && docker run -d --name stacks-wallet-web stacks-wallet-web \
        && docker cp stacks-wallet-web:stacks-wallet-chromium.zip . \
        && docker rm -f stacks-wallet-web
    
    You can test the extension by selecting "Get started" on https://boom.money.
  3. Download the ZIP file of the repository main branch and upload to "Source code".
  4. Submit by clicking "Save changes".

Publish Firefox Extension2

  1. Add "Version notes" with the same content as found in the CHANGELOG.md file for the release.
  2. Add the following for "Notes for Reviewers":
    Please use this command to build the extension with Docker:
        docker build -f Dockerfile -t stacks-wallet-web . \
        && docker run -d --name stacks-wallet-web stacks-wallet-web \
        && docker cp stacks-wallet-web:stacks-wallet-chromium.zip . \
        && docker rm -f stacks-wallet-web
    
    You can test the extension by selecting "Get started" on https://boom.money.
  3. Download the ZIP file of the repository main branch and upload to "Source code".
  4. Submit by clicking "Save changes".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.