mirror of
https://github.com/valitydev/notification-proto.git
synced 2024-11-06 00:55:18 +00:00
refactor gh build (#3)
This commit is contained in:
parent
4291bc6b04
commit
f05dbac36b
23
.github/workflows/build.yml
vendored
23
.github/workflows/build.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: Build Artifact
|
||||
name: Maven Build Artifact
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
@ -7,23 +7,4 @@ on:
|
||||
|
||||
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/base-workflow/.github/workflows/maven-thrift-build.yml@v1.0.0
|
29
.github/workflows/deploy.yml
vendored
29
.github/workflows/deploy.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: Deploy Artifact
|
||||
name: Maven Deploy Artifact
|
||||
|
||||
on:
|
||||
push:
|
||||
@ -8,24 +8,9 @@ on:
|
||||
|
||||
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.12
|
||||
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 }}"'
|
||||
uses: valitydev/base-workflow/.github/workflows/maven-thrift-deploy.yml@v1.0.0
|
||||
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 }}
|
10
.github/workflows/erlang-build-verify.yml
vendored
Normal file
10
.github/workflows/erlang-build-verify.yml
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
name: Erlang Build And Verify
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: valitydev/base-workflow/.github/workflows/erlang-thrift-build.yml@v1.0.0
|
69
rebar.config
Normal file
69
rebar.config
Normal file
@ -0,0 +1,69 @@
|
||||
%% Common project erlang options.
|
||||
{erl_opts, [
|
||||
|
||||
% mandatory
|
||||
debug_info,
|
||||
warnings_as_errors,
|
||||
warn_export_all,
|
||||
warn_missing_spec,
|
||||
warn_untyped_record,
|
||||
warn_export_vars,
|
||||
|
||||
% by default
|
||||
warn_unused_record,
|
||||
warn_bif_clash,
|
||||
warn_obsolete_guard,
|
||||
warn_unused_vars,
|
||||
warn_shadow_vars,
|
||||
warn_unused_import,
|
||||
warn_unused_function,
|
||||
warn_deprecated_function,
|
||||
|
||||
% at will
|
||||
% bin_opt_info
|
||||
% no_auto_import,
|
||||
warn_missing_spec_all
|
||||
]}.
|
||||
|
||||
%% XRef checks
|
||||
{xref_checks, [
|
||||
undefined_function_calls,
|
||||
undefined_functions,
|
||||
deprecated_functions_calls,
|
||||
deprecated_functions
|
||||
]}.
|
||||
|
||||
%% Tests
|
||||
{cover_enabled, true}.
|
||||
|
||||
%% Dialyzer static analyzing
|
||||
{dialyzer, [
|
||||
{warnings, [
|
||||
% mandatory
|
||||
unmatched_returns,
|
||||
error_handling,
|
||||
race_conditions,
|
||||
unknown
|
||||
]},
|
||||
{plt_apps, all_deps}
|
||||
]}.
|
||||
|
||||
{deps, []}.
|
||||
|
||||
{plugins, [
|
||||
{rebar3_thrift_compiler,
|
||||
{git, "https://github.com/valitydev/rebar3_thrift_compiler.git", {tag, "0.3.1"}}}
|
||||
]}.
|
||||
|
||||
{provider_hooks, [
|
||||
{pre, [
|
||||
{compile, {thrift, compile}},
|
||||
{clean , {thrift, clean }}
|
||||
]}
|
||||
]}.
|
||||
|
||||
{thrift_compiler_opts, [
|
||||
{in_dir, "proto"},
|
||||
{in_files, all},
|
||||
{gen, "erlang:scoped_typenames"}
|
||||
]}.
|
1
rebar.lock
Normal file
1
rebar.lock
Normal file
@ -0,0 +1 @@
|
||||
[].
|
Loading…
Reference in New Issue
Block a user