Skip to content
This repository was archived by the owner on May 30, 2022. It is now read-only.
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/coin-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: coin-integration-alpha
on:
push:
branches:
- 'int-*'
jobs:
prebuild-for-platform:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-16.04, macos-latest, windows-2016]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a question, why not using ubuntu-latest and windows-latest ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to always use well-defined runners instead of xxx-latest to avoid to break CI in future latest release platforms

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@master
with:
node-version: 12.x
registry-url: https://registry.npmjs.org
always-auth: true
- uses: actions/setup-python@v1
with:
python-version: '2.7.x'
- name: install
run: yarn --frozen-lockfile --ignore-scripts
- name: fetch libcore
run: yarn preinstall
- name: config gcc
if: runner.os == 'Linux'
run: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 700 --slave /usr/bin/g++ g++ /usr/bin/g++-7
- name: prebuild for electron 9.0
run: npx node-pre-gyp configure build package --runtime=electron --target=9.0.0 --build-from-source --dist-url=https://electronjs.org/headers
- name: prebuild for electron 8.2
run: npx node-pre-gyp configure build package --runtime=electron --target=8.2.0 --build-from-source --dist-url=https://electronjs.org/headers
- name: prebuild for node 12
run: npx node-pre-gyp configure build package --target=12.16.0
- name: Get version and publish @coin on NPM
if: matrix.os == 'ubuntu-16.04'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_GAGBO_PUBLISH_TOKEN }}
run: |
export COIN=$(echo ${GITHUB_REF#refs/heads/int-})
echo "I hope you remembered to run 'yarn version --prerelease --preid \"$COIN\"'"
[ -z "$COIN" ] && echo "the COIN tag is not set. Aborting publish" && exit 1
yarn publish --tag "$COIN"