896: Auto-release merged PRs r=fryorcraken a=fryorcraken



Co-authored-by: fryorcraken.eth <git@fryorcraken.xyz>
This commit is contained in:
status-bors-ng[bot] 2022-08-19 13:21:11 +00:00 committed by GitHub
commit 63bfb9b2e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 13 deletions

View File

@ -8,14 +8,15 @@ on:
- "trying" - "trying"
pull_request: pull_request:
env:
BUF_VERSION: "0.56.0"
NIM_WAKU_VERSION: "v0.9"
NODE_JS: "16"
jobs: jobs:
build_and_test: build_and_test:
env:
BUF_VERSION: "0.56.0"
NIM_WAKU_VERSION: "v0.9"
strategy: strategy:
matrix: matrix:
node: [16]
os: [ubuntu-latest] os: [ubuntu-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
@ -31,9 +32,9 @@ jobs:
tar xavf nim-waku-ubuntu-latest.tar.gz tar xavf nim-waku-ubuntu-latest.tar.gz
- name: Install NodeJS - name: Install NodeJS
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: ${{ matrix.node }} node-version: ${{ env.NODE_JS }}
- name: Ensure wakunode2 is ready - name: Ensure wakunode2 is ready
shell: bash shell: bash
@ -42,12 +43,6 @@ jobs:
cd nim-waku/build cd nim-waku/build
./wakunode2 --help ./wakunode2 --help
- name: Cache npm cache
uses: actions/cache@v2
with:
path: ~/.npm
key: node-${{ matrix.os }}-${{ matrix.node }}-v1-${{ hashFiles('**/package-lock.json') }}
- name: install using npm ci - name: install using npm ci
uses: bahmutov/npm-install@v1 uses: bahmutov/npm-install@v1
@ -77,3 +72,33 @@ jobs:
with: with:
name: nim-waku-logs name: nim-waku-logs
path: log/ path: log/
release_next:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
needs: [build_and_test]
steps:
- name: Checkout code
uses: actions/checkout@v2.3.3
- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_JS }}
- name: install using npm ci
uses: bahmutov/npm-install@v1
- name: Append git hash to version
shell: bash
run: |
CURR_VERSION=$(cat package.json | jq .version | tr -d '"')
GIT_HASH=$(git rev-parse --short HEAD)
cat package.json| jq --arg version "$CURR_VERSION-$GIT_HASH" '.version |= $version' > _package.json
mv -f _package.json package.json
- name: Authenticate with registry
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ./.npmrc
- name: publish
run: npm publish --tag next --access public

View File

@ -1,5 +1,5 @@
status = [ status = [
"build_and_test (16, ubuntu-latest)", "build_and_test (ubuntu-latest)",
"examples_build_and_test (eth-pm)", "examples_build_and_test (eth-pm)",
"examples_build_and_test (eth-pm-wallet-encryption)", "examples_build_and_test (eth-pm-wallet-encryption)",
"examples_build_and_test (relay-angular-chat)", "examples_build_and_test (relay-angular-chat)",