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.yml
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: '.nvmrc'
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: '.nvmrc'
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.yml
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: '.nvmrc'
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: '.nvmrc'
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
Expand Up @@ -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 .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18
GedasGa marked this conversation as resolved.
Show resolved Hide resolved
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
Expand Down
Loading