-
Notifications
You must be signed in to change notification settings - Fork 11
79 lines (67 loc) · 2.11 KB
/
release.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Release
on:
push:
branches: [ main ]
tags: [ "*" ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
# GENERATE & PUBLISH DOC
publish_doc:
uses: ./.github/workflows/wc_publishSite.yml
with:
publish: "yes"
# BUILD, TEST & COVERAGE
build_coverage:
uses: ./.github/workflows/wc_build.yml
with:
matrix_filter: "[?isRelease==`release`]"
# PUBLISH JARS AT MAVEN CENTRAL
matrix_prep:
if: github.repository == 'hablapps/doric'
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- id: set-matrix
uses: JoshuaTheMiller/[email protected]
with:
filter: "[?isRelease==`release`]"
mvn_release:
if: github.repository == 'hablapps/doric'
needs: [ "matrix_prep", "publish_doc", "build_coverage" ]
strategy:
max-parallel: 1
fail-fast: false
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# SETUP & CACHE
- uses: coursier/[email protected]
with:
jvm: adopt:8
apps: sbt scala scalafmt # https://github.com/coursier/apps
- name: Coursier cache
uses: coursier/cache-action@v6
with:
extraKey: "${{ matrix.spark }}"
# MAVEN RELEASE
- name: Maven release 🎁
run: sbt ci-release -DsparkVersion=${{ matrix.spark }}
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
- name: Publish on gh release the JARS
if: github.ref_type == 'tag'
uses: AButler/[email protected]
with:
files: 'core/target/scala-2.**/doric_*.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}
# CLEAN PROJECT BEFORE CACHE
- name: Cleaning for cache 🚯
uses: ./.github/actions/clean_cache