-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e064308
commit 9af0b14
Showing
5 changed files
with
39 additions
and
26 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 |
---|---|---|
|
@@ -12,28 +12,6 @@ permissions: | |
contents: write | ||
|
||
jobs: | ||
# For non-main branches, only push to IPFS so we can test it | ||
push: | ||
runs-on: ubuntu-latest | ||
if: github.ref != 'refs/heads/main' | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
- run: npm run prepublish | ||
- name: Upload to IPFS | ||
id: upload_to_ipfs | ||
uses: aquiladev/[email protected] | ||
with: | ||
path: ./out/pools.json | ||
service: pinata | ||
pinataPinName: mainnet-pools-$GITHUB_SHA | ||
pinataKey: ${{ secrets.PINATA_KEY }} | ||
pinataSecret: ${{ secrets.PINATA_SECRET }} | ||
|
||
# For the main branch, push to IPFS and create a release | ||
release: | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/main' | ||
|
@@ -43,12 +21,17 @@ jobs: | |
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
- run: npm run prepublish | ||
- run: | | ||
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then | ||
npm run prepublish | ||
else | ||
npm run prepublish:dev | ||
fi | ||
- name: Upload to IPFS | ||
id: upload_to_ipfs | ||
uses: aquiladev/[email protected] | ||
with: | ||
path: ./out/pools.json | ||
path: ./out/prime.json | ||
service: pinata | ||
pinataPinName: mainnet-pools-$GITHUB_SHA | ||
pinataKey: ${{ secrets.PINATA_KEY }} | ||
|
@@ -77,6 +60,6 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ./out/pools.json | ||
asset_name: pools.json | ||
asset_path: ./out/prime.json | ||
asset_name: prime.json | ||
asset_content_type: application/json |
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,15 @@ | ||
const fs = require("fs"); | ||
|
||
const args = process.argv.slice(2); | ||
const IS_DEV = args[0]; | ||
const primeUsers = require(`./metadata/data${IS_DEV ? "-dev" : ""}.json`); | ||
|
||
fs.writeFile( | ||
__dirname + "/out/prime.json", | ||
JSON.stringify(primeUsers), | ||
(err) => { | ||
if (err) { | ||
throw err; | ||
} | ||
} | ||
); |
File renamed without changes.
File renamed without changes.
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,15 @@ | ||
{ | ||
"name": "prime-data", | ||
"version": "1.0.0", | ||
"description": "Repository for data related to Centrifuge Prime users.", | ||
"main": "out/index.js", | ||
"scripts": { | ||
"prepublish": "npm run build", | ||
"prepublish:dev": "npm run build:dev", | ||
"build:dev": "mkdir -p out/ && node build.js dev", | ||
"build": "mkdir -p out/ && node build.js" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"packageManager": "[email protected]+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610" | ||
} |