From dac04497cad16ba4ede9504f177c0aaa142e556e Mon Sep 17 00:00:00 2001 From: undefined Date: Wed, 30 Mar 2022 01:10:58 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=84=20Synced=20local=20'.github/workfl?= =?UTF-8?q?ows/'=20with=20remote=20'workflows/proto/'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-jar.yml | 33 -------------------------- .github/workflows/erlang-pr.yml | 21 +++++++--------- .github/workflows/frontend-pr.yml | 21 ++++++++++++++++ .github/workflows/frontend-publish.yml | 24 +++++++++++++++++++ .github/workflows/java-deploy.yml | 17 +++++++++++++ .github/workflows/java-pr.yml | 30 +++-------------------- 6 files changed, 73 insertions(+), 73 deletions(-) delete mode 100644 .github/workflows/deploy-jar.yml create mode 100644 .github/workflows/frontend-pr.yml create mode 100644 .github/workflows/frontend-publish.yml create mode 100644 .github/workflows/java-deploy.yml diff --git a/.github/workflows/deploy-jar.yml b/.github/workflows/deploy-jar.yml deleted file mode 100644 index 944a574..0000000 --- a/.github/workflows/deploy-jar.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Deploy JAR Artifact - -on: - push: - branches: - - 'master' - - 'main' - -jobs: - deploy: - runs-on: ubuntu-20.04 - steps: - - name: Install thrift - uses: valitydev/action-setup-thrift@v0.0.1 - - name: Checkout Repo - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Retrieve commit info - run: | - echo "::set-output name=COMMIT_NUMBER::$(git rev-list HEAD --count)" - echo "::set-output name=SHA_7::${GITHUB_SHA::7}" - id: commit_info - - name: Deploy package - uses: valitydev/action-deploy-jdk-package@v1.0.9 - with: - server-username: ${{ secrets.OSSRH_USERNAME }} - server-password: ${{ secrets.OSSRH_TOKEN }} - deploy-secret-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} - deploy-secret-key-password: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} - maven-args: > - -Dcommit.number=${{ steps.commit_info.outputs.COMMIT_NUMBER }} - -Drevision="1.${{ steps.commit_info.outputs.COMMIT_NUMBER }}-${{ steps.commit_info.outputs.SHA_7 }}" diff --git a/.github/workflows/erlang-pr.yml b/.github/workflows/erlang-pr.yml index 573701c..eee9e65 100644 --- a/.github/workflows/erlang-pr.yml +++ b/.github/workflows/erlang-pr.yml @@ -1,29 +1,24 @@ -name: Build Erlang +name: Erlang build on: pull_request: - branches: ['*'] - push: - branches: [master] + branches: + - "*" jobs: build: name: Build and verify runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - - name: Checkout Repo - uses: actions/checkout@v2 + - uses: valitydev/action-setup-thrift@v1 - - name: Install thrift - uses: valitydev/action-setup-thrift@v0.0.5 - - - name: Setup BEAM - uses: erlef/setup-beam@v1.10 + - uses: erlef/setup-beam@v1 id: beam with: - otp-version: '24' - rebar3-version: '3.18' + otp-version: "24" + rebar3-version: "3.18" - name: Restore PLT cache uses: actions/cache@v2 diff --git a/.github/workflows/frontend-pr.yml b/.github/workflows/frontend-pr.yml new file mode 100644 index 0000000..ab070ea --- /dev/null +++ b/.github/workflows/frontend-pr.yml @@ -0,0 +1,21 @@ +name: 'Frontend: PR' + +on: + pull_request: + branches: ['*'] + +jobs: + configured: + uses: valitydev/action-frontend/.github/workflows/configured.yml@v0.1 + check: + name: Check + runs-on: ubuntu-latest + needs: configured + if: needs.configured.outputs.exists == 'true' + steps: + - uses: actions/checkout@v3 + - uses: valitydev/action-frontend/setup@v0.1 + - uses: valitydev/action-setup-thrift@v1.0.0 + - run: npm i # protocols don't always update the package-lock.json, so installing from package.json + - name: Codegen + run: npm run codegen diff --git a/.github/workflows/frontend-publish.yml b/.github/workflows/frontend-publish.yml new file mode 100644 index 0000000..b3871c5 --- /dev/null +++ b/.github/workflows/frontend-publish.yml @@ -0,0 +1,24 @@ +name: 'Frontend: Publish' + +on: + push: + branches: ['master', 'main'] + +jobs: + configured: + uses: valitydev/action-frontend/.github/workflows/configured.yml@v0.1 + publish: + name: Publish + runs-on: ubuntu-latest + needs: configured + if: needs.configured.outputs.exists == 'true' + steps: + - uses: actions/checkout@v3 + - uses: valitydev/action-frontend/setup@v0.1 + - uses: valitydev/action-setup-thrift@v1.0.0 + - run: npm i # protocols don't always update the package-lock.json, so installing from package.json + - name: Build + run: npm run codegen + - uses: valitydev/action-frontend/publish@v0.1 + with: + npm-token: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/java-deploy.yml b/.github/workflows/java-deploy.yml new file mode 100644 index 0000000..2cd8c45 --- /dev/null +++ b/.github/workflows/java-deploy.yml @@ -0,0 +1,17 @@ +name: Java deploy + +on: + push: + branches: + - "master" + - "main" + +jobs: + deploy: + uses: valitydev/java-workflow/.github/workflows/maven-thrift-deploy.yml@v1 + secrets: + server-username: ${{ secrets.OSSRH_USERNAME }} + server-password: ${{ secrets.OSSRH_TOKEN }} + deploy-secret-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} + deploy-secret-key-password: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} + mm-webhook-url: ${{ secrets.MATTERMOST_WEBHOOK_URL }} diff --git a/.github/workflows/java-pr.yml b/.github/workflows/java-pr.yml index 100ba31..0db65b3 100644 --- a/.github/workflows/java-pr.yml +++ b/.github/workflows/java-pr.yml @@ -1,34 +1,10 @@ -name: Build Java +name: Java build on: pull_request: branches: - - '*' + - "*" jobs: build: - runs-on: ubuntu-20.04 - steps: - - name: Install thrift - uses: valitydev/action-setup-thrift@v0.0.1 - - name: Checkout Repo - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set up Maven - uses: actions/setup-java@v2 - with: - java-version: '15' - distribution: 'adopt' - - name: Retrieve commit info - run: | - echo "::set-output name=COMMIT_NUMBER::$(git rev-list HEAD --count)" - echo "::set-output name=SHA_7::${GITHUB_SHA::7}" - id: commit_info - - name: Build package - run: > - mvn - --batch-mode - -Dcommit.number=${{ steps.commit_info.outputs.COMMIT_NUMBER }} - -Drevision="1.${{ steps.commit_info.outputs.COMMIT_NUMBER }}-${{ steps.commit_info.outputs.SHA_7 }}" - clean compile -f pom.xml + uses: valitydev/java-workflow/.github/workflows/maven-thrift-build.yml@v1