This repository has been archived by the owner on Dec 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 96
70 lines (67 loc) · 2.77 KB
/
MarketplaceRelease.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
name: Marketplace Release
on:
push:
tags:
- "*-web-v*"
- "*-native-v*"
- "*-hybrid-v*"
- "data-widgets-v*"
- "atlas-core-v*"
- "atlas-web-*-v*"
- "web-actions-v*"
jobs:
publish_release:
name: "Marketplace Release"
runs-on: ubuntu-latest
steps:
- name: "Checking-out code"
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
with:
submodules: false
- name: "Defining Environment Variables"
id: variables
run: echo "::set-output name=tag::$(git tag --points-at HEAD)"
- name: "Defining lerna scope"
uses: jungwinter/split@c185fe95439c136a8788b7f700bd5275920d7109 # v1
id: scope
with:
msg: "${{ steps.variables.outputs.tag }}"
seperator: "-v"
- name: "Defining node version"
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # v2
with:
node-version-file: ".nvmrc"
- name: "Installing dependencies"
run: npm install
- name: "Building native widgets and js actions"
if: contains(steps.scope.outputs._0, '-native')
run: npm run release:native
- name: "Updating Native Mobile Resources project"
if: contains(steps.scope.outputs._0, '-native')
run: "npm run create-modules:native"
env:
GH_USERNAME: ${{ secrets.GH_USERNAME }}
GH_EMAIL: ${{ secrets.GH_EMAIL }}
GH_NAME: ${{ secrets.GH_NAME }}
GH_PAT: ${{ secrets.GH_PAT }}
TAG: ${{ steps.variables.outputs.tag }}
- name: "Check changes and publish package ${{ steps.variables.outputs.tag }}"
run: "npm run release:marketplace -- --scope '${{ steps.scope.outputs._0 }}'"
env:
OPENID_URL: ${{ secrets.OPENID_URL }}
CPAPI_USERNAME: ${{ secrets.CPAPI_USERNAME }}
CPAPI_PASS_PROD: ${{ secrets.CPAPI_PASS_PROD }}
TAG: ${{ steps.variables.outputs.tag }}
- name: "Send slack msg on failure"
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7 # v2
env:
SLACK_CHANNEL: ${{ secrets.SLACK_MULTIXP_CHANNEL }}
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: ${{ secrets.WEBCONTENT_BOT_IMAGE }}
SLACK_MESSAGE: "Something went wrong while uploading version ${{ steps.scope.outputs._1 }} of package ${{ steps.scope.outputs._0 }} to the marketplace. <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|More info..>"
SLACK_TITLE: ":warning: *Automation Failed*"
SLACK_USERNAME: ${{ secrets.WEBCONTENT_BOT_NAME }}
SLACK_WEBHOOK: ${{ secrets.SLACK_MULTIXP_WEBHOOK }}
SLACK_FOOTER: "Created by Aliens"
MSG_MINIMAL: true