Skip to content

Commit ff9a3b7

Browse files
authored
Merge pull request #119 from snowiow/github-workflow-release-proposal
Propose a Github Workflow for release process
2 parents 149d3e4 + 741e127 commit ff9a3b7

File tree

4 files changed

+40
-1
lines changed

4 files changed

+40
-1
lines changed

.github/workflows/publish.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [published, edited]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
with:
14+
ref: ${{ github.event.release.tag_name }}
15+
- name: Use node.js 16.x
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: 16
19+
- name: NPM Install
20+
run: npm ci
21+
- name: Check Format
22+
run: npm run format:check
23+
- name: Lint
24+
run: npm run lint
25+
- name: Test
26+
run: npm run test
27+
- uses: JasonEtco/build-and-tag-action@v2
28+
env:
29+
GITHUB_TOKEN: ${{ github.token }}
30+
with:
31+
tag_name: ${{ github.event.release.tag_name }}

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,12 @@ For this reason, and to simplify what we expect to be the most common use-cases,
275275
we chose to start with the simplest possible configuration.
276276
If you find that these options don't meet your needs, please open an issue to let us know.
277277
278+
## Release Process
279+
280+
By creating a new Release a workflow is triggered creating a new commit which only contains `dist` and the `action.yml`. The necessary tags, i.e. for the release v1.0.7, the tag v1.0.7 is created and the v1.0 and v1 tags are updated.
281+
282+
For the tagging and building the [build-and-tag](https://github.com/JasonEtco/build-and-tag-action) action by [Jason Etcovitch](https://github.com/JasonEtco) is used. It expects to have the main attribute and a build script to be set in the `package.json`. It then builds the code with the ncc compiler and creates the new tag/ updates existing tags for minor and major versions automatically.
283+
278284
## License
279285
280286
This SDK is distributed under the

local.js

100755100644
File mode changed.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
"name": "@aws-actions/codebuild-run-build",
33
"version": "1.0.4",
44
"description": "Execute CodeBuild::startBuild for the current repo.",
5-
"main": "index.js",
5+
"main": "dist/index.js",
66
"scripts": {
77
"lint": "prettier -c *.js *.json *.md test/*.js; eslint **.js test/**.js",
88
"format": "prettier --write -c *.js *.json *.md test/*.js; eslint --fix **.js test/**.js",
9+
"format:check": "prettier --check -c *.js *.json *.md test/*.js; eslint --fix **.js test/**.js",
910
"package": "ncc build index.js -o dist",
11+
"build": "ncc build index.js -o dist",
1012
"test": "mocha"
1113
},
1214
"author": "[email protected]",

0 commit comments

Comments
 (0)