-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from HyperPlay-Gaming/sync/testing
Sync
- Loading branch information
Showing
5 changed files
with
5,370 additions
and
377 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Release to npm | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'package.json' | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
uses: HyperPlay-Gaming/workflows/.github/workflows/npm_publish.yml@main | ||
with: | ||
node_version: '18' | ||
pkg_manager: 'yarn' | ||
install: 'yarn' | ||
build: 'yarn buildDist' | ||
publish: 'yarn publish' | ||
pkg_manager_add_dev_dep: 'yarn add -D' | ||
secrets: | ||
NPM_TOKEN: '${{ secrets.NPM_TOKEN }}'b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Chain Sync | ||
|
||
# run on the 1st and 15th of the month at midnight or on dispatch | ||
on: | ||
schedule: | ||
- cron: '0 * 1,15 * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
sync: | ||
uses: HyperPlay-Gaming/workflows/.github/workflows/nodejs_commands.yml@main | ||
with: | ||
node_version: '16' | ||
pkg_manager: 'yarn' | ||
install: 'yarn install --immutable --frozen-lockfile' | ||
name: 'sync' | ||
command_one: 'yarn sync' | ||
command_one_name: 'Sync chains and submit PR' | ||
checkout_recursive: false | ||
secrets: | ||
NPM_TOKEN: '${{ secrets.NPM_TOKEN }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import fs from 'fs' | ||
|
||
async function main(){ | ||
const packageJsonBuffer = fs.readFileSync('./package.json') | ||
const packageJson = JSON.parse(packageJsonBuffer.toString()) | ||
packageJson.version = packageJson.version.split('.').map((element: any, index: number)=>{ | ||
element = Number.parseInt(element) | ||
let newElement = element | ||
if (index === 1){ | ||
return newElement = element + 1 | ||
} | ||
return newElement.toString() | ||
}).reduce((accumulator: any, currentValue: any)=>{ | ||
if (accumulator === ''){ | ||
return currentValue | ||
} | ||
return accumulator + '.' + currentValue | ||
}, '') | ||
fs.writeFileSync('./package.json', JSON.stringify(packageJson, null, 2)) | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.