Skip to content

Commit 695a927

Browse files
authored
Merge pull request #1 from upstash/initial-code
Add the Workflow Project
2 parents 6045c5f + 51005e6 commit 695a927

File tree

228 files changed

+13284
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+13284
-0
lines changed

.github/workflows/release.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repo
14+
uses: actions/checkout@v3
15+
16+
- name: Set env
17+
run: echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
18+
19+
- name: Setup Bun
20+
uses: oven-sh/setup-bun@v1
21+
with:
22+
bun-version: latest
23+
24+
- name: Set package version
25+
run: echo $(jq --arg v "${{ env.VERSION }}" '(.version) = $v' package.json) > package.json
26+
27+
- name: Install Dependencies
28+
run: bun install
29+
30+
- name: Build
31+
run: bun run build
32+
33+
- name: Set NPM_TOKEN
34+
run: npm set "//registry.npmjs.org/:_authToken" ${{ secrets.NPM_TOKEN }}
35+
36+
- name: Publish
37+
if: "!github.event.release.prerelease"
38+
working-directory: ./dist
39+
run: |
40+
npm pkg delete scripts.prepare
41+
npm publish --access public
42+
43+
- name: Publish release candidate
44+
if: "github.event.release.prerelease"
45+
working-directory: ./dist
46+
run: |
47+
npm pkg delete scripts.prepare
48+
npm publish --access public --tag=canary

.github/workflows/test.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Tests
2+
on:
3+
pull_request:
4+
5+
env:
6+
QSTASH_TOKEN: ${{ secrets.QSTASH_TOKEN }}
7+
8+
jobs:
9+
local-tests:
10+
runs-on: ubuntu-latest
11+
12+
name: Upstash Workflow Tests
13+
steps:
14+
- name: Setup repo
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Bun
18+
uses: oven-sh/setup-bun@v1
19+
with:
20+
bun-version: latest
21+
22+
- name: Install Dependencies
23+
run: bun install
24+
25+
- name: Run tests
26+
run: bun run test
27+
28+
- name: Build
29+
run: bun run build

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.turbo
2+
node_modules
3+
dist
4+
.next
5+
.env
6+
.dev.vars
7+
.vercel
8+
.DS_Store
9+
.idea
10+
11+
# examples
12+
examples/*/package-lock.json
13+
examples/*/pnpm-lock.yaml
14+
examples/ngrok.log
15+
restart.sh
16+
17+
bootstrap.sh

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bun --no -- commitlint --edit ""

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bun run lint && bun run fmt

.husky/pre-push

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bun run test && bun run build

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist
2+
examples
3+
node_modules

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2024 Upstash, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

bun.lockb

326 KB
Binary file not shown.

commitlint.config.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
2+
// ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
3+
// docs: Documentation only changes
4+
// feat: A new feature
5+
// fix: A bug fix
6+
// perf: A code change that improves performance
7+
// refactor: A code change that neither fixes a bug nor adds a feature
8+
// style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
9+
// test: Adding missing tests or correcting existing tests
10+
11+
module.exports = {
12+
extends: ["@commitlint/config-conventional"],
13+
rules: {
14+
"body-leading-blank": [1, "always"],
15+
"body-max-line-length": [2, "always", 100],
16+
"footer-leading-blank": [1, "always"],
17+
"footer-max-line-length": [2, "always", 100],
18+
"header-max-length": [2, "always", 100],
19+
"scope-case": [2, "always", "lower-case"],
20+
"subject-case": [2, "never", ["sentence-case", "start-case", "pascal-case", "upper-case"]],
21+
"subject-empty": [2, "never"],
22+
"subject-full-stop": [2, "never", "."],
23+
"type-case": [2, "always", "lower-case"],
24+
"type-empty": [2, "never"],
25+
"type-enum": [
26+
2,
27+
"always",
28+
[
29+
"build",
30+
"chore",
31+
"ci",
32+
"docs",
33+
"feat",
34+
"fix",
35+
"perf",
36+
"refactor",
37+
"revert",
38+
"style",
39+
"test",
40+
"translation",
41+
"security",
42+
"changeset",
43+
],
44+
],
45+
},
46+
};

0 commit comments

Comments
 (0)