Skip to content

Commit 39855a5

Browse files
committed
Setup CI
1 parent 78c3be7 commit 39855a5

File tree

9 files changed

+77
-7
lines changed

9 files changed

+77
-7
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Node.js Package Publish NPM
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: 22
15+
- run: npm ci
16+
- run: npm test
17+
18+
publish-npm:
19+
needs: build
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
packages: write
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: actions/setup-node@v4
27+
with:
28+
node-version: 22
29+
registry-url: https://npm.pkg.github.com/
30+
- run: npm ci
31+
- run: cd src/randflake-ts/sparx64 && npm publish && cd ../../
32+
env:
33+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
34+
- run: cd src/randflake-ts/randflake && npm publish && cd ../../
35+
env:
36+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/npm-publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Node.js Package Publish NPM
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: 22
15+
- run: npm ci
16+
- run: npm test
17+
18+
publish-npm:
19+
needs: build
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: 22
26+
registry-url: https://registry.npmjs.org/
27+
- run: npm ci
28+
- run: cd src/randflake-ts/sparx64 && npm publish && cd ../../
29+
env:
30+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
31+
- run: cd src/randflake-ts/randflake && npm publish && cd ../../
32+
env:
33+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ func main() {
7373

7474
### Python
7575
```python
76+
import time
7677
from randflake import Generator
7778

7879
now = int(time.time())

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "randflake-monorepo",
3-
"version": "1.1.0",
3+
"version": "1.5.1",
44
"private": true,
55
"description": "Distributed unique ID generator with encryption",
66
"workspaces": [

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "randflake"
7-
version = "1.5.0"
7+
version = "1.5.1"
88
description = "A Python implementation the Randflake ID: a distributed, uniform, unpredictable, unique random ID generator."
99
authors = [
1010
{name = "GoSuda"}

src/randflake-ts/randflake/jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@safe/randflake",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"exports": "./src/index.ts",
55
"publish": {
66
"include": [

src/randflake-ts/randflake/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "randflake",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"description": "TypeScript implementation of randflake ID generator",
55
"type": "module",
66
"main": "./dist/index.js",
@@ -21,7 +21,7 @@
2121
"dist"
2222
],
2323
"dependencies": {
24-
"sparx64": "^1.5.0"
24+
"sparx64": "^1.5.1"
2525
},
2626
"devDependencies": {
2727
"typescript": "^5.2.2",

src/randflake-ts/sparx64/jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@safe/sparx64",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"exports": "./src/index.ts",
55
"publish": {
66
"include": [

src/randflake-ts/sparx64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sparx64",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"description": "TypeScript implementation of SPARX-64/128 block cipher",
55
"type": "module",
66
"main": "./dist/index.js",

0 commit comments

Comments
 (0)