aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/publish.yml
blob: 7f4e1ca0c597a6075f35ba2f55aa2d7f0f5721ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Publish

on:
  push:
    tags:
      - 'v*'

jobs:
  build_central:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: Generate tag
        run: echo "CUSTOM_BUILD=${GITHUB_REF##*/}" >> $GITHUB_ENV
      - name: Build
        run: ./gradlew -Pbuild_ver=$CUSTOM_BUILD :central:distTar
      - uses: ncipollo/release-action@v1.7.3
        with:
          artifacts: "./central/build/distributions/central-*.tar"
          token: ${{ secrets.GITHUB_TOKEN }}
          allowUpdates: true
          replacesArtifacts: false
  build_agent: 
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: Generate tag
        run: echo "CUSTOM_BUILD=${GITHUB_REF##*/}" >> $GITHUB_ENV
      - name: Build
        run: ./gradlew -Pbuild_ver=$CUSTOM_BUILD :agent:distTar
      - uses: ncipollo/release-action@v1.7.3
        with:
          artifacts: "./agent/build/distributions/agent-*.tar"
          token: ${{ secrets.GITHUB_TOKEN }}
          allowUpdates: true
          replacesArtifacts: false