Skip to content

Commit

Permalink
chore: automate release workflows (#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
karenc-bq authored Nov 18, 2024
1 parent f7ee161 commit ade2149
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 7 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release AWS Advanced NodeJS Wrapper
on:
release:
types: published

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: "Clone Repository"
uses: actions/checkout@v4
- name: "Set up Node.js"
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: "Install dependencies"
run: npm install --no-save
- name: "Run eslint - linting"
run: npm run lint
- name: "Check formatting"
run: npm run check
- name: "Run unit tests"
run: npm test
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/release_draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jobs:
steps:
- name: "Clone Repository"
uses: actions/checkout@v4
with:
fetch-depth: 50
- name: "Set up Node.js"
uses: actions/setup-node@v4
with:
Expand All @@ -35,7 +33,9 @@ jobs:
- name: "Run unit tests"
run: npm test
- name: "Package Wrapper"
run: mkdir ./build | npm pack --pack-destination ./build
run: |
mkdir ./build
npm run prepublish
- name: "Set Version Env Variable"
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: "Get Release Details"
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aws-advanced-nodejs-wrapper",
"version": "0.0.1",
"version": "1.0.0",
"private": true,
"type": "module",
"workspaces": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ private static void createTelemetryOtlpContainer(TestEnvironmentConfig env) {
}

private static String getContainerBaseImageName(TestEnvironmentRequest request) {
return "node:21";
return "node:22";
}

private static void configureIamAccess(TestEnvironmentConfig env) {
Expand Down

0 comments on commit ade2149

Please sign in to comment.