Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AS-81: Move project under Speechify's name, setup CI/CD #1

Merged
merged 9 commits into from
Jan 19, 2023
40 changes: 40 additions & 0 deletions .github/workflows/test-and-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Test and build
on:
push:
branches:
- master
pull_request:
types: [ opened, reopened, synchronize ]

jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: 'npm'
node-version-file: '.node-version'
registry-url: 'https://npm.pkg.github.com'
scope: '@speechify'
- run: npm ci
- run: npm test

build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: 'npm'
node-version-file: '.node-version'
registry-url: 'https://npm.pkg.github.com'
scope: '@speechify'
- run: npm ci
- run: npm run build
41 changes: 41 additions & 0 deletions .github/workflows/test-build-and-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish package to GitHub Packages
on:
push:
tags:
- 'v*'

jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: 'npm'
node-version-file: '.node-version'
registry-url: 'https://npm.pkg.github.com'
scope: '@speechify'
- run: npm ci
- run: npm test

build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: 'npm'
node-version-file: '.node-version'
registry-url: 'https://npm.pkg.github.com'
scope: '@speechify'
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -103,9 +103,6 @@ dist
# TernJS port file
.tern-port

# Package locks
package-lock.json
yarn.lock

# VSCode
# IDEs
.vscode
.idea
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Liam Dyer
Copyright (c) 2021 Speechify

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
10,508 changes: 10,508 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@saghen/string-tracker",
"name": "@speechifyinc/string-tracker",
"version": "1.4.1",
"description": "A zero dependency library for operating on strings while maintaining changes and index maps transparently",
"engines": {
@@ -27,21 +27,21 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/Saghen/string-tracker.git"
"url": "git+https://github.com/SpeechifyInc/string-tracker.git"
},
"author": "Liam Dyer",
"author": "Speechify",
"license": "MIT",
"bugs": {
"url": "https://github.com/Saghen/string-tracker/issues"
"url": "https://github.com/SpeechifyInc/string-tracker/issues"
},
"homepage": "https://github.com/Saghen/string-tracker#readme",
"homepage": "https://github.com/SpeechifyInc/string-tracker#readme",
"devDependencies": {
"@types/jest": "^26.0.24",
"@types/jest": "^27.0.0",
"@types/node": "^18.6.1",
"chalk": "^5.0.0",
"esbuild": "^0.14.14",
"friendly-words": "^1.2.0",
"ts-jest": "^27.0.4",
"ts-jest": "^27.1.5",
"typescript": "^4.5.5"
}
}