-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (70 loc) · 3.02 KB
/
publish-packages.yml
File metadata and controls
79 lines (70 loc) · 3.02 KB
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: Publish packages
on:
workflow_run:
workflows: [Bump version]
types: [completed]
pull_request:
types:
- opened
- reopened
- synchronize
env:
WORKFLOW_OUT_DIR: ./workflow-outputs
jobs:
publish-packages:
name: ${{ github.event_name == 'pull_request' && 'Test publishing packages' || 'Publish packages' }}
env:
JDK_VERSION: 21
GITHUB_ACTOR: ${{ secrets.MODULE_FETCH_TOKEN_USERNAME}}
GITHUB_TOKEN: ${{ secrets.MODULE_FETCH_TOKEN }}
permissions:
packages: write
runs-on: ubuntu-latest
steps:
- name: Run checkout github action
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || '' }}
lfs: 'true'
submodules: 'true'
fetch-depth: 0
- name: Read bump-version outputs
if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' }}
id: bump-version
uses: ./actions/read-bump-version-outputs
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
workflow-out-dir: ${{ env.WORKFLOW_OUT_DIR }}
workflow-run-id: ${{ github.event.workflow_run.id }}
- name: Setup GitHub Runner workflow
uses: ./mobile-android-pipelines/actions/setup-runner
with:
jdk-version: 21
- name: Cache mobile-android-pipelines build
uses: ./actions/cache-pipelines-build
- name: Publish to Github Packages
if: ${{ github.event_name == 'workflow_run' && steps.bump-version.outputs.version-bumped == 'true' }}
uses: ./mobile-android-pipelines/actions/maven-publish
with:
GITHUB_ACTOR: ${{ secrets.MODULE_PUSH_TOKEN_USERNAME }}
GITHUB_TOKEN: ${{ secrets.MODULE_PUSH_TOKEN }}
VERSION_NAME: ${{ steps.bump-version.outputs.new-version }}
- name: Test publishing to Maven local
if: ${{ github.event_name == 'pull_request' }}
uses: ./mobile-android-pipelines/actions/maven-publish-local
with:
expected-packages: '
uk.gov.onelogin.criorchestrator.features:resume-internal,
uk.gov.onelogin.criorchestrator.features:resume-internal-api,
uk.gov.onelogin.criorchestrator.features:resume-public-api,
uk.gov.onelogin.criorchestrator.features:select-doc-internal,
uk.gov.onelogin.criorchestrator.features:select-doc-internal-api,
uk.gov.onelogin.criorchestrator.libraries:analytics,
uk.gov.onelogin.criorchestrator.libraries:di,
uk.gov.onelogin.criorchestrator.libraries:screenshot-testing,
uk.gov.onelogin.criorchestrator.sdk:sdk,
uk.gov.onelogin.criorchestrator.sdk:sdk-internal,
uk.gov.onelogin.criorchestrator.sdk:sdk-shared-api'
version-name: ${{ steps.bump-version.outputs.new-version }}
- name: Clean workspace
uses: ./mobile-android-pipelines/actions/clean-workspace