diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index e45434d2..485c21a4 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -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: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 22144e55..b8458b04 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dcffc97f..7285e807 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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