diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml new file mode 100644 index 00000000..ea2d329f --- /dev/null +++ b/.github/workflows/npm-publish-github-packages.yml @@ -0,0 +1,36 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages + +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - run: npm ci + - run: npm test + + publish-gpr: + needs: build + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: https://npm.pkg.github.com/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/sdk_contrib/fetch/package.json b/sdk_contrib/fetch/package.json index d360c27f..340697fe 100644 --- a/sdk_contrib/fetch/package.json +++ b/sdk_contrib/fetch/package.json @@ -40,7 +40,7 @@ "repository": "https://github.com/aws/aws-xray-sdk-node/tree/master/sdk_contrib/fetch", "devDependencies": { "@types/node-fetch": "^2.6.4", - "chai-as-promised": "=7.1.1", + "chai-as-promised": "7.1.2", "node-fetch": "^2.6.11", "ts-expect": "^1.3.0" },