Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
30 changes: 30 additions & 0 deletions .changeset/changelog.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Docs: https://github.com/changesets/changesets/blob/main/docs/modifying-changelog-format.md#writing-changelog-formatting-functions

const REPO = "awslabs/aws-lambda-invoke-store";
Comment thread
trivikr marked this conversation as resolved.

const getGithubCommitWithLink = (commit) =>
`[${commit}](https://github.com/${REPO}/commit/${commit})`;

export const getDependencyReleaseLine = (changesets, dependenciesUpdated) => {
if (dependenciesUpdated.length === 0) return "";

const changesetLink = `- Updated dependencies [${changesets
.map(({ commit }) => (commit ? getGithubCommitWithLink(commit) : ""))
.filter((_) => _)
.join(", ")}]:`;

const updatedDepsList = dependenciesUpdated.map(
(dependency) => ` - ${dependency.name}@${dependency.newVersion}`
);

return [changesetLink, ...updatedDepsList].join("\n");
};

export const getReleaseLine = (changeset, _type) => {
const { commit, summary } = changeset;
const [firstLine, ...futureLines] = summary.split("\n").map((l) => l.trimRight());

return `- ${firstLine} (${getGithubCommitWithLink(commit)})${
futureLines.length > 0 ? futureLines.map((l) => ` ${l}`).join("\n") : ""
}`;
};
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
"changelog": "./changelog.mjs",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/spotty-geese-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@aws/lambda-invoke-store": patch
---

Set up release scripts
27 changes: 26 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,29 @@ on:
jobs:
call-build:
uses: ./.github/workflows/build.yml
# ToDo: Add release code for 0.0.2 onwards
release:
needs: call-build
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: corepack
run: npm i -g corepack
- uses: actions/setup-node@v4
with:
node-version: "24.x" # Trusted publishing requires npm >=v11.5.1
cache: "yarn"

- run: yarn

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: yarn release
title: Publish <version>
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @aws/lambda-invoke-store

## 0.0.1

### Major Changes

- Initial code Node.js Invoke Store for AWS Lambda ([c6c89c1a1b3fbf0357a5dce4ca4a0463e02df2fc](https://github.com/awslabs/aws-lambda-invoke-store/commit/c6c89c1a1b3fbf0357a5dce4ca4a0463e02df2fc))
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
},
"scripts": {
"build": "tsc",
"clean": "rm -rf dist",
"test": "vitest run",
"test:watch": "vitest watch",
"clean": "rm -rf dist"
"release": "yarn build && changeset publish"
},
"devDependencies": {
"@changesets/cli": "^2.29.6",
"@tsconfig/node18": "^18.2.4",
"@types/node": "^18.19.112",
"typescript": "~5.4.5",
Expand Down
Loading