-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (87 loc) · 3.23 KB
/
deploy-dev.yaml
File metadata and controls
95 lines (87 loc) · 3.23 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Release packages
permissions:
actions: write
contents: write
packages: write
checks: read
pull-requests: write
deployments: write
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
on:
push:
branches:
- main
jobs:
pre_job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
concurrent_skipping: 'outdated_runs'
# paths_ignore: '["**/README.md", ".github/**"]'
cancel_others: 'true'
release-packages:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 2
ref: ${{ needs.check-app.outputs.branch }}
- name: Prepare Environment
uses: ./.github/actions/setup-env
timeout-minutes: 10
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Code Quality
uses: ./.github/actions/quality
timeout-minutes: 10
- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
@dxp:registry=https://registry.npmjs.org
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: npm run release
commit: 'feat(changeset): version packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Checkout code
# if: steps.changesets.outputs.published == 'true'
# uses: actions/checkout@v3
# with:
# ref: create-dxp-app/base
#
# - name: Reset branch
# if: steps.changesets.outputs.published == 'true'
# run: |
# git fetch origin main:main
# git reset --hard main
#
# - name: Update api-harmonization dependencies
# if: steps.changesets.outputs.published == 'true'
# run: npm install @dxp/framework@latest @o2s/utils.logger@latest @dxp/integrations.mocked --workspace=@dxp/api-harmonization
#
# - name: Create create-dxp-app Pull Request
# id: cpr
# uses: peter-evans/create-pull-request@v7
# if: steps.changesets.outputs.published == 'true'
# with:
# commit-message: 'feat(create-dxp-app): update dependencies'
# branch: create-dxp-app/patch
# delete-branch: true
# title: 'Update dependencies in create-dxp-app'