-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Expand file tree
/
Copy pathaction.yml
More file actions
64 lines (60 loc) · 2.06 KB
/
action.yml
File metadata and controls
64 lines (60 loc) · 2.06 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
name: Load Verdaccio with AmplifyJs
description: Turn on Verdaccio and load up all of the AmplifyJS build artifacts
runs:
using: 'composite'
steps:
- name: Start verdaccio
run: |
npx verdaccio@6.0.5 &
while ! nc -z localhost 4873; do
echo "Verdaccio not running yet"
sleep 1
done
# Run your commands after verdaccio is up and running
echo "Verdaccio is up and running, proceeding with the script..."
shell: bash
- name: Authenticate with Verdaccio
shell: bash
env:
NPM_REGISTRY: http://localhost:4873/
NPM_USER: verdaccio
NPM_PASS: verdaccio
NPM_EMAIL: verdaccio@amplify.js
run: |
TOKEN=$(curl -X PUT \
-H "Content-Type: application/json" \
-d "{\"name\": \"$NPM_USER\", \"password\": \"$NPM_PASS\"}" \
$NPM_REGISTRY-/user/org.couchdb.user:$NPM_USER | jq -r '.token')
echo "registry=$NPM_REGISTRY
//localhost:4873/:_authToken=$TOKEN" > ~/.npmrc
- name: Configure registry and git
shell: bash
working-directory: ./amplify-js
env:
NPM_REGISTRY: http://localhost:4873/
NPM_USER: verdaccio
NPM_PASS: verdaccio
NPM_EMAIL: verdaccio@amplify.js
run: |
yarn config set registry $NPM_REGISTRY
npm set registry $NPM_REGISTRY
git config --global user.email $NPM_EMAIL
git config --global user.name $NPM_USER
git status
git --no-pager diff
- name: Publish to verdaccio
shell: bash
working-directory: ./amplify-js
run: |
scripts/retry-yarn-script.sh -s publish:verdaccio -n 5 -r true
yarn info aws-amplify@unstable description
npm info aws-amplify@unstable version
- name: Upload artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: failure()
with:
name: ${{ inputs.test_name }}-npm-log
if-no-files-found: ignore
path: /Users/runner/.npm/_logs/
retention-days: 3
overwrite: true