Skip to content

Commit de4cc47

Browse files
committed
wip: try out new approach
1 parent c4e9c6c commit de4cc47

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.github/workflows/ci.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,13 @@ jobs:
188188
steps:
189189
- uses: actions/checkout@v2
190190

191+
# NOTES@jsjoeio - trying out
192+
- uses: actions/download-artifact@v2
193+
id: download
194+
with:
195+
name: "npm-package"
196+
path: tmp-npm-package-dir
197+
191198
- name:
192199
Set NPM_ENVIRONMENT
193200
# The way this logic works is it checks if the GitHub event is a push to the `main` branch

ci/lib.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ download_artifact() {
130130
local artifacts_url
131131
artifacts_url="$(get_artifact_url "$artifact_name" "$environment" "$branch")"
132132

133-
echo "Inside download_artifact"
134-
echo "Using the following values:"
133+
echo "Using the following values to download artifact:"
135134
echo "-artifact_name: $artifact_name"
136135
echo "-dst: $dst"
137136
echo "-environment: $environment"

ci/steps/publish-npm.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ main() {
7676
# Source:https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
7777
BRANCH="${GITHUB_HEAD_REF-main}"
7878
echo "Calling download_artifact with npm env: $NPM_ENVIRONMENT and branch: $BRANCH"
79-
download_artifact npm-package ./release-npm-package "$NPM_ENVIRONMENT" "$BRANCH"
79+
# download_artifact npm-package ./release-npm-package "$NPM_ENVIRONMENT" "$BRANCH"
80+
# NOTES@jsjoeio testing an approach where we run this script after downloading the artifact
81+
# in a job in the workflow file itself
82+
unzip -q -o "tmp-npm-package-dir" -d "./release-npm-package"
83+
8084
# https://github.com/actions/upload-artifact/issues/38
8185
tar -xzf release-npm-package/package.tar.gz
8286

0 commit comments

Comments
 (0)