diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 44dfaf68..8b3ddc82 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,9 +4,9 @@ # Create a JavaScript Action using TypeScript -Use this template to bootstrap the creation of a JavaScript action.:rocket: +Use this template to bootstrap the creation of a TypeScript action.:rocket: -This template includes compilication support, tests, a validation workflow, publishing, and versioning guidance. +This template includes compilation support, tests, a validation workflow, publishing, and versioning guidance. If you are new, there's also a simpler introduction. See the [Hello World JavaScript Action](https://github.com/actions/hello-world-javascript-action) @@ -14,7 +14,9 @@ If you are new, there's also a simpler introduction. See the [Hello World JavaS Click the `Use this Template` and provide the new repo details for your action -## Code in Master +## Code in Main + +> First, you'll need to have a reasonably modern version of `node` handy. This won't work with versions older than 9, for instance. Install the dependencies ```bash @@ -23,7 +25,7 @@ $ npm install Build the typescript and package it for distribution ```bash -$ npm run build && npm run pack +$ npm run build && npm run package ``` Run the tests :heavy_check_mark: @@ -40,7 +42,7 @@ $ npm test ## Change action.yml -The action.yml contains defines the inputs and output for your action. +The action.yml defines the inputs and output for your action. Update the action.yml with your name, description, inputs and outputs for your action. @@ -74,19 +76,21 @@ Actions are run from GitHub repos so we will checkin the packed dist folder. Then run [ncc](https://github.com/zeit/ncc) and push the results: ```bash -$ npm run pack +$ npm run package $ git add dist $ git commit -a -m "prod dependencies" $ git push origin releases/v1 ``` +Note: We recommend using the `--license` option for ncc, which will create a license file for all of the production node modules used in your project. + Your action is now published! :rocket: See the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md) ## Validate -You can now validate the action by referencing `./` in a workflow in your repo (see [test.yml](.github/workflows/test.yml)]) +You can now validate the action by referencing `./` in a workflow in your repo (see [test.yml](.github/workflows/test.yml)) ```yaml uses: ./ @@ -94,26 +98,8 @@ with: milliseconds: 1000 ``` -See the [actions tab](https://github.com/actions/javascript-action/actions) for runs of this action! :rocket: +See the [actions tab](https://github.com/actions/typescript-action/actions) for runs of this action! :rocket: ## Usage: -After testing you can [create a v1 tag](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md) to reference the stable and latest V1 action - -## Release - -```bash -$ vi package.json -$ vi package-lock.json -$ make build -$ git add . -$ git commit -m 'Bump version 1.0.13 -> 1.1.0' -$ git tag -a v1.1.0 -m 'version 1.1.0' -$ git push --follow-tags -$ git tag -fa v1 -m "Update v1 tag" -$ git push origin v1 --force -``` - -Go to [GitHub Releases]() and create a new release - -See +After testing you can [create a v1 tag](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md) to reference the stable and latest V1 action \ No newline at end of file diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 00000000..2f64cd8c --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,19 @@ +# Release + +```bash +$ vi package.json +$ vi package-lock.json +$ make build +$ git add . +$ git commit -m 'Bump version 1.0.13 -> 1.1.0' +$ git tag -a v1.1.0 -m 'version 1.1.0' +$ git push --follow-tags +$ git tag -fa v1 -m "Update v1 tag" +$ git push origin v1 --force +``` + +Go to [GitHub Releases](https://github.com/act10ns/slack/releases) and create a new release + +See [Versioning](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md) to understand version strategy. + +See [Publishing actions in GitHub Marketplace](https://docs.github.com/en/actions/creating-actions/publishing-actions-in-github-marketplace) for general information about how to make actions available on GitHub. diff --git a/package-lock.json b/package-lock.json index 0c459f4a..715dad86 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "slack", - "version": "1.3.3", + "version": "1.4.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "slack", - "version": "1.3.3", + "version": "1.4.0", "license": "MIT", "dependencies": { "@actions/core": "^1.6.0", diff --git a/package.json b/package.json index ccee53d3..d096d7a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "slack", - "version": "1.3.3", + "version": "1.4.0", "private": true, "description": "Notify Slack of GitHub Actions job and step status.", "main": "lib/main.js",