Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
Contributions to this project are released to the public under the project's open source license.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
This project was generated from the
default GitHub Actions javascript-action template.
The following files make up this action:
action.yml- action metadata.src/index.js- main action entry point. Callsmain.jsto run the action.src/main.js- main action logic. Changes to the action's functionality should be made here.package.json/package-lock.json- defines the JavaScript dependencies that the action needs to run.dist/*- the compiled version of the action with all of its dependencies. These files are automatically generated and should NOT be modified directly.
First, cd into the action folder and install the project dependencies via
npm:
cd last-successful-commit-hash-action
npm installIn order to avoid the need to check in the node_modules folder, this action
utilizes @vercel/ncc to compile the action code
and its dependencies into a single JavaScript file that can be used for
distribution.
npm run allThis will run all of the formatters, tests, and compile the action into the
dist folder. Make sure to include any updated files in your commit.
- Fork and clone the repository
- Configure and install the dependencies:
npm i - Make sure the tests pass on your machine:
npm test - Create a new branch:
git checkout -b my-branch-name - Make your change, add tests, and make sure the tests still pass
- Do one final check to ensure all tests, linter, and compilation steps pass:
npm run all - Push to your fork and submit a pull request
- Pat your self on the back and wait for your pull request to be reviewed and merged.
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
- Follow the style guide style by running the linter
npm run lint. - Write tests.
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
- Write a good commit message.
When it comes time to create a new release, repository maintainers should follow the steps below to create and publish a new release.
For versioning, we are following the recommended versioning documentation available in GitHub's actions/toolkit repository.
[ ] TODO: Add automated release instructions
Perform the following steps to create a manual release:
- Make sure all desired changes have been pushed to the
mainbranch. - Create a
release/*branch off ofmain(e.g.release/v1.0.1). - Update the
versioninpackage.jsonto the desired version. - Run
npm installto update thepackage-lock.jsonfile. - Run
npm run allone last time to make sure all tests, linters, etc. pass. - Create a pull request from the
release/*branch tomain. - Once the pull request is merged, create a new release targeted on
mainin the GitHub UI. Make sure to set it to create the corresponding tag on publish (e.g.v1.0.1) and keep the "Publish this Action to the GitHub Marketplace" option checked. - Once the release has been published on GitHub, switch back to the
mainbranch and pull down any changes. - Update the major version tag to point the latest release, which should look something like the following (replacing "v1" if publishing a different major version tag):
git tag -fa v1 -m "Update v1 tag"
git push origin v1 --force