Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
workerbee
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
workerbee
Commits
479f9987
Verified
Commit
479f9987
authored
7 months ago
by
Mateusz Tyszczak
Browse files
Options
Downloads
Patches
Plain Diff
Update WorkerBee github actions yml
parent
5884a9d7
No related branches found
No related tags found
No related merge requests found
Pipeline
#103429
passed
7 months ago
Stage: .pre
Stage: build
Stage: test
Stage: deploy
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.github/workflows/npm_publish.yml
+3
-1
3 additions, 1 deletion
.github/workflows/npm_publish.yml
scripts/publish_by_tag.sh
+7
-3
7 additions, 3 deletions
scripts/publish_by_tag.sh
with
10 additions
and
4 deletions
.github/workflows/npm_publish.yml
+
3
−
1
View file @
479f9987
...
...
@@ -17,5 +17,7 @@ jobs:
node-version
:
'
18'
registry-url
:
'
https://registry.npmjs.org'
-
run
:
|
./scripts/publish_by_tag.sh 452 "${{ github.ref_name }}" "dist/hiveio-workerbee-${{ github.ref_name }}.tgz" build dist
cd dist
echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} >> .npmrc
./scripts/publish_by_tag.sh 452 "${{ github.ref_name }}" "dist/hiveio-workerbee-${{ github.ref_name }}.tgz" build
npm publish --access public --provenance
This diff is collapsed.
Click to expand it.
scripts/publish_by_tag.sh
+
7
−
3
View file @
479f9987
...
...
@@ -5,7 +5,7 @@
#
# Example usage for project WorkerBee:
#
# ./scripts/publish_by_tag.sh 452 1.27.6-rc5 "dist/hiveio-workerbee-1.27.6-rc5.tgz" build
# ./scripts/publish_by_tag.sh 452 1.27.6-rc5 "dist/hiveio-workerbee-1.27.6-rc5.tgz" build
dist
set
-e
...
...
@@ -13,6 +13,7 @@ PROJECT_ID=${1:?Missing arg \#1 - GitLab project id}
TAG
=
${
2
:?Missing
arg \#2 - TAG name
}
TGZ_PATH
=
${
3
:?Missing
arg \#3 - TGZ Artifacts filepath
}
JOB_NAME
=
${
4
:?Missing
arg \#4 - Job name containing the tgz artifacts
}
OUTPUT_DIR
=
${
5
:?Missing
arg \#5 - Output directory
}
API_PREFIX
=
"https://gitlab.syncad.com/api/v4/projects/
${
PROJECT_ID
}
"
...
...
@@ -31,6 +32,9 @@ echo "Downloading artifact from \"${TGZ_PULL_URL}\" to \"${TARGET_FILEPATH}\""
curl
-o
"
${
TARGET_FILEPATH
}
"
"
${
TGZ_PULL_URL
}
"
echo
"Publishing artifacts to npm with provenance for tag
\"
${
TAG
}
\"
"
mkdir
-vp
"
${
OUTPUT_DIR
}
"
echo
"Unpacking artifact to
\"
${
OUTPUT_DIR
}
\"
"
tar
-xvf
"
${
TARGET_FILEPATH
}
"
--strip-components
=
1
-C
"
${
OUTPUT_DIR
}
"
npm publish
--access
public
--provenance
"
${
TARGET_FILEPATH
}
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment