-
Notifications
You must be signed in to change notification settings - Fork 13
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 #376 from Setheum-Labs/wake-up
Wake up
- Loading branch information
Showing
12 changed files
with
261 additions
and
153 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,73 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
name: publish solidity package | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
inputs: | ||
commitMessage: | ||
description: 'commit message' | ||
required: true | ||
default: 'update tokens and publish it' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
persist-credentials: false | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly-2021-06-01 | ||
components: rustfmt | ||
target: wasm32-unknown-unknown | ||
default: true | ||
- name: publish solidity package | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: | | ||
set -x | ||
echo running on branch ${GITHUB_REF##*/} | ||
git config --global user.name "Github Actions" | ||
git config --global user.email "Github Actions" | ||
cd predeploy-contracts | ||
git checkout master | ||
git pull | ||
cd .. | ||
make generate-tokens | ||
cd predeploy-contracts | ||
if [ -z "$(git status --porcelain)" ] | ||
then | ||
echo "nothing to update." | ||
else | ||
git commit -am "${{ github.event.inputs.commitMessage }}" | ||
fi | ||
cd .. | ||
cd predeploy-contracts/contracts | ||
yarn run prepare | ||
yarn version --patch | ||
new_version=$(yarn versions --json | jq -er '.data."@setheum-labs/contracts"') | ||
git push "https://${{ secrets.GH_PAT }}@github.com/Setheum-Labs/predeploy-contracts.git" HEAD:master | ||
yarn publish --new-version=$new_version --access=public | ||
cd ../.. | ||
git commit -am "${{ github.event.inputs.commitMessage }}" | ||
if [ ${GITHUB_REF##*/} -eq "master" ] | ||
then | ||
branch="update-predeploy-contracts-$(date "+%Y%m%d%H%M%y")" | ||
git checkout -b "$branch" | ||
git push -u "https://${{ secrets.GH_PAT }}@github.com/Setheum-Labs/Setheum.git" "$branch" | ||
hub pull-request -m "${{ github.event.inputs.commitMessage }}" | ||
else | ||
git push "https://${{ secrets.GH_PAT }}@github.com/Setheum-Labs/Setheum.git" HEAD:${GITHUB_REF##*/} | ||
fi |
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
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,16 @@ | ||
# name: Verify bootnotes | ||
|
||
# on: | ||
# schedule: | ||
# - cron: "00 04 * * 1" # 4AM weekly on monday | ||
|
||
# jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# with: | ||
# submodules: recursive | ||
# - name: verify bootnotes | ||
# run: | | ||
# ./scripts/verify-bootnodes.sh neom |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.