Skip to content

Commit 43992c2

Browse files
committed
add actions for automation
1 parent 550240e commit 43992c2

File tree

3 files changed

+92
-0
lines changed

3 files changed

+92
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "Create a release"
2+
3+
description: "Creates a release"
4+
5+
inputs:
6+
github-token:
7+
description: "GitHub token of a user with permission to create a release"
8+
required: true
9+
10+
runs:
11+
using: "composite"
12+
13+
steps:
14+
- name: "Determine tag"
15+
if: "${{ github.event_name }} == 'push' && ${{ github.ref_type }} == 'tag'"
16+
run: "echo \"RELEASE_TAG=${GITHUB_REF#refs/tags/}\" >> $GITHUB_ENV"
17+
shell: "bash"
18+
19+
- name: "Create release"
20+
uses: "actions/github-script@v7.0.1"
21+
with:
22+
github-token: "${{ inputs.github-token }}"
23+
script: |
24+
if (!process.env.RELEASE_TAG) {
25+
core.setFailed("The environment variable RELEASE_TAG is not defined.")
26+
27+
return;
28+
}
29+
30+
try {
31+
const response = await github.rest.repos.createRelease({
32+
draft: false,
33+
generate_release_notes: true,
34+
name: process.env.RELEASE_TAG,
35+
owner: context.repo.owner,
36+
prerelease: false,
37+
repo: context.repo.repo,
38+
tag_name: process.env.RELEASE_TAG,
39+
});
40+
41+
core.exportVariable('RELEASE_HTML_URL', response.data.html_url);
42+
core.exportVariable('RELEASE_ID', response.data.id);
43+
core.exportVariable('RELEASE_UPLOAD_URL', response.data.upload_url);
44+
} catch (error) {
45+
core.setFailed(error.message);
46+
}

.github/workflows/node.js.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
jobs:
13+
publish-to-npm:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [20.x]
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
cache: 'npm'
27+
- run: npm install
28+
- run: npm run build
29+
- run: cp cdk.json.built cdk.json
30+
- run: npm pack
31+
- run: npm publish --access=public
32+
env:
33+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
105105

106106
- Fix A record
107107

108+
109+
## [1.1.10] - 2024-06-05
110+
### Added
111+
112+
- Add option to submit a feature request
113+
114+
115+
### Changed
116+
117+
118+
### Fixed
119+
120+

0 commit comments

Comments
 (0)