Skip to content

Commit

Permalink
Updating workflow. (#159)
Browse files Browse the repository at this point in the history
* Updating workflow.

* Adding concurrency config to the task, removing redundant triggers

* Additional fix on triggers.

* Removed push trigger on npm publish task.

* Reverting a change.

* Changing folders name to avoid upload.

* Updating task.
  • Loading branch information
Juanito87 authored Jul 17, 2023
1 parent 0dff12d commit 44f50c3
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 8 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
name: Publish Package to npmjs
on: workflow_dispatch

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:

workflow_dispatch:

jobs:

build:

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v3

- uses: arduino/setup-protoc@v2

# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'

- run: npm ci
working-directory: yellowstone-grpc-client-nodejs

- run: npm run build
working-directory: yellowstone-grpc-client-nodejs

- run: npm publish
working-directory: yellowstone-grpc-client-nodejs
env:
Expand Down
27 changes: 21 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
name: Release plugin

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:

workflow_dispatch:

push:
tags:
- 'v*'
pull_request:
paths:
- '.github/workflows/release.yml'
branches:
- 'main'

env:
CARGO_TERM_COLOR: always

jobs:

release:

strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]

runs-on: ["${{ matrix.os }}"]

steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -62,14 +73,18 @@ jobs:
- name: Build release tarball
run: ./ci/create-tarball.sh

- name: rename binaries for ubuntu22 release
- name: Rename binaries for ubuntu22 release
if: matrix.os == 'ubuntu-22.04'
run: |
mv target/release/client target/release/client22
mv target/release/config-check target/release/config-check22
mv target/release/client target/release/client-22
mv target/release/config-check target/release/config-check-22
mv ${{ env.GEYSER_PLUGIN_NAME }}-release-x86_64-unknown-linux-gnu.tar.bz2 ${{ env.GEYSER_PLUGIN_NAME }}-release22-x86_64-unknown-linux-gnu.tar.bz2
mv ${{ env.GEYSER_PLUGIN_NAME }}-release-x86_64-unknown-linux-gnu.yml ${{ env.GEYSER_PLUGIN_NAME }}-release22-x86_64-unknown-linux-gnu.yml
- name: Deleteing directories to avoid upload conflict
run: |
rm -rf target/release/client.d target/release/config-check.d
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
name: Build plugin

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
workflow_dispatch:
push:
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:

test:

strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]

runs-on: ["${{ matrix.os }}"]

steps:
- uses: actions/checkout@v3

Expand Down

0 comments on commit 44f50c3

Please sign in to comment.