-
-
Notifications
You must be signed in to change notification settings - Fork 3
171 lines (165 loc) · 5.19 KB
/
release.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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
name: Publish to NPM and auto deploy to dependents
on:
release:
types:
- published
jobs:
deploy:
runs-on: ${{ matrix.os }}
env:
TERM: xterm
PRERELEASE_TAG: edge
strategy:
matrix:
os:
- ubuntu-22.04
node-version:
- '18'
# Install deps and cache
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org
cache: npm
- name: Install dependencies
run: npm clean-install --prefer-offline --frozen-lockfile
# Let's do tests rq just to make sure we dont push something that is fundamentally broken
- name: Lint code
run: npm run lint
- name: Run unit tests
run: npm run test
# Deploy to NPM
- name: Prepare release
uses: lando/prepare-release-action@v3
- name: Deploy release to npm
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_DEPLOY_TOKEN}}
run: |
if [ "${{ github.event.release.prerelease }}" == "false" ]; then
npm publish --access public --dry-run
npm publish --access public
echo "::notice title=Published ${{ github.ref_name }} to @${{ github.repository }}::This is a stable release published to the default 'latest' npm tag"
else
npm publish --access public --tag ${{ env.PRERELEASE_TAG }} --dry-run
npm publish --access public --tag ${{ env.PRERELEASE_TAG }}
echo "::notice title=Published ${{ github.ref_name }} to @${{ github.repository }}@${{ env.PRERELEASE_TAG }}::This is a pre-release published to the '${{ env.PRERELEASE_TAG }}' npm tag"
fi
# auto-deploy:
# runs-on: ${{ matrix.os }}
# needs: deploy
# env:
# TERM: xterm
# strategy:
# fail-fast: false
# matrix:
# os:
# - ubuntu-22.04
# node-version:
# - '18'
# auto-deploy-repos:
# - name: lando/acquia
# dirs: ./
# - name: lando/apache
# dirs: ./
# - name: lando/backdrop
# dirs: ./
# - name: lando/cli
# dirs: ./
# - name: lando/compose
# dirs: ./
# - name: lando/core
# dirs: ./
# - name: lando/core-next
# dirs: ./
# - name: lando/docs
# dirs: ./
# - name: lando/dotnet
# dirs: ./
# - name: lando/drupal
# dirs: ./
# - name: lando/elasticsearch
# dirs: ./
# - name: lando/go
# dirs: ./
# - name: lando/joomla
# dirs: ./
# - name: lando/lagoon
# dirs: ./
# - name: lando/lamp
# dirs: ./
# - name: lando/laravel
# dirs: ./
# - name: lando/lemp
# dirs: ./
# - name: lando/mailhog
# dirs: ./
# - name: lando/mariadb
# dirs: ./
# - name: lando/mean
# dirs: ./
# - name: lando/memcached
# dirs: ./
# - name: lando/mongo
# dirs: ./
# - name: lando/mssql
# dirs: ./
# - name: lando/mysql
# dirs: ./
# - name: lando/nginx
# dirs: ./
# - name: lando/node
# dirs: ./
# - name: lando/pantheon
# dirs: ./
# - name: lando/php
# dirs: ./
# - name: lando/phpmyadmin
# dirs: ./
# - name: lando/platformsh
# dirs: ./
# - name: lando/postgres
# dirs: ./
# - name: lando/python
# dirs: ./
# - name: lando/redis
# dirs: ./
# - name: lando/ruby
# dirs: ./
# - name: lando/symfony
# dirs: ./
# - name: lando/tomcat
# dirs: ./
# - name: lando/solr
# dirs: ./
# - name: lando/varnish
# dirs: ./
# - name: lando/wordpress
# dirs: ./
# steps:
# # Install deps and cache
# # NOTE that we use ref: main because we need to get the code that was updated from the prepare-release-action
# - name: Checkout code
# uses: actions/checkout@v3
# with:
# ref: main
# - name: Install node ${{ matrix.node-version }}
# uses: actions/setup-node@v3
# with:
# node-version: ${{ matrix.node-version }}
# registry-url: https://registry.npmjs.org
# cache: npm
# - name: Install dependencies
# run: npm clean-install --prefer-offline --frozen-lockfile
# # Auto deploy to everything else
# - name: Auto deploy to ${{ matrix.auto-deploy-repos.name }}
# uses: lando/auto-deploy-action@v2
# with:
# branch: main
# slug: ${{ matrix.auto-deploy-repos.name }}
# token: ${{ secrets.PIROG_TOKEN }}
# pr: false
# dirs: ${{ matrix.auto-deploy-repos.dirs }}