Skip to content

[MOO-1126]: TakePicture function in NativeMobileResources presentatio… #42

[MOO-1126]: TakePicture function in NativeMobileResources presentatio…

[MOO-1126]: TakePicture function in NativeMobileResources presentatio… #42

name: Marketplace Release
on:
push:
tags:
- "*-native-v*"
jobs:
publish_release:
name: "Marketplace Release"
runs-on: ubuntu-latest
steps:
- name: "Checking-out code"
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
submodules: false
- name: "Defining Environment Variables"
id: variables
run: echo "tag=$(git tag --points-at HEAD)" >> ${{ runner.os == 'Windows' && '$env:GITHUB_OUTPUT' || '$GITHUB_OUTPUT' }}
- name: "Defining scope"
uses: jungwinter/split@c185fe95439c136a8788b7f700bd5275920d7109 # v1
id: scope
with:
msg: "${{ steps.variables.outputs.tag }}"
seperator: "-v"
- name: "Defining node version"
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
with:
node-version-file: ".nvmrc"
- name: "Installing dependencies"
run: yarn install
- name: "Building native widgets and js actions"
run: yarn workspaces foreach run release
- name: "Updating Native Mobile Resources project"
run: yarn workspaces foreach run create-modules
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: yarn workspace ${{ steps.scope.outputs._0 }} run release:marketplace
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_CHANNEL }}
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: ${{ secrets.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.BOT_NAME }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_FOOTER: ${{ secrets.BOT_FOOTER }}
MSG_MINIMAL: true