-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9dffee
commit 0ff1222
Showing
1 changed file
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
|
||
concurrency: | ||
# New commit on branch cancels running workflows of the same branch | ||
group: ${{ github.workflow }}-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check-packages: | ||
name: Check packages for mobile and tv platform | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.gh_token }} | ||
NPM_REGISTRY_TOKEN: ${{ secrets.npm_registry_token }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
show-progress: false | ||
|
||
- name: Prepare repository | ||
run: git fetch --unshallow --tags | ||
|
||
- name: Unset header | ||
# https://github.com/intuit/auto/issues/1030 | ||
run: git config --local --unset http.https://github.com/.extraheader | ||
|
||
- name: Prepare environment | ||
uses: ./.github/actions/prepare-environment | ||
|
||
- name: Lerna bootstrap for mobile platform | ||
run: npm run bootstrap:mobile | ||
|
||
- name: Lerna bootstrap for tv platform | ||
run: npm run bootstrap:tv | ||
|
||
publish-packages: | ||
name: Prepare and publish dev version for all platforms | ||
runs-on: ubuntu-latest | ||
needs: ["check-packages"] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.gh_token }} | ||
NPM_REGISTRY_TOKEN: ${{ secrets.npm_registry_token }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
clean: true | ||
fetch-depth: 0 | ||
|
||
- name: Prepare repository | ||
run: git fetch --tags | ||
|
||
- name: Unset header | ||
# https://github.com/intuit/auto/issues/1030 | ||
run: git config --local --unset http.https://github.com/.extraheader | ||
|
||
- name: Unset header | ||
# https://github.com/intuit/auto/issues/1030 | ||
run: git config advice.addIgnoredFile false | ||
|
||
- name: Prepare environment | ||
uses: ./.github/actions/prepare-environment | ||
|
||
# Подготовка и публикация пакетов с компонентами для мобильной платформы | ||
|
||
- name: Update lerna config with all mode | ||
run: MODE="all" npm run set-lerna-packages | ||
|
||
- name: Prepare packages for native platform | ||
run: PLATFORM="mobile" npm run bootstrap | ||
|
||
- name: Update packages version | ||
run: npm run bump-version -- --conventional-prerelease --preid "dev-$(git rev-parse --short HEAD)" | ||
|
||
- name: Replace dependencies and packages name | ||
run: PLATFORM="mobile" npm run replace-dependencies | ||
|
||
- name: Update lerna config with components mode | ||
run: MODE="components" npm run set-lerna-packages | ||
|
||
- name: Publish component packages | ||
run: PLATFORM="mobile" TAG="dev" npm run components-publish | ||
|
||
- name: Revert bump version | ||
run: npm run revert-bump-version | ||
|
||
# Подготовка и публикация пакетов с компонентами для ТВ платформы | ||
|
||
- name: Update lerna config with all mode | ||
run: MODE="all" npm run set-lerna-packages | ||
|
||
- name: Prepare packages for native platform | ||
run: PLATFORM="tv" npm run bootstrap | ||
|
||
- name: Update packages version | ||
run: npm run bump-version -- --conventional-prerelease --preid "dev-$(git rev-parse --short HEAD)" | ||
|
||
- name: Replace dependencies and packages name | ||
run: PLATFORM="tv" npm run replace-dependencies | ||
|
||
- name: Update lerna config with components mode | ||
run: MODE="components" npm run set-lerna-packages | ||
|
||
- name: Publish component packages | ||
run: PLATFORM="tv" TAG="dev" npm run components-publish | ||
|
||
- name: Revert bump version | ||
run: npm run revert-bump-version | ||
|
||
# Подготовка и публикация пакетов с темами | ||
|
||
- name: Update lerna config with themes mode | ||
run: MODE="themes" npm run set-lerna-packages | ||
|
||
- name: Update packages version | ||
run: npm run bump-version -- --conventional-prerelease --preid "dev-$(git rev-parse --short HEAD)" | ||
|
||
- name: Publish themes packages | ||
run: npx lerna exec -- npm publish --tag dev | ||
|
||
# Шаг отображающий актаульное состояние package файлов | ||
|
||
- name: Show diff | ||
run: git diff |