Skip to content

Commit

Permalink
chore: remove publish from test-pr already present in another job
Browse files Browse the repository at this point in the history
  • Loading branch information
genisd committed Oct 19, 2023
1 parent 7e91c3b commit 8619658
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
1 change: 0 additions & 1 deletion .github.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ local testJob = util.ghJob(
util.checkoutAndYarn(ref='${{ github.event.pull_request.head.sha }}', fullClone=false),
util.action('setup chrome', 'browser-actions/setup-chrome@latest'),
util.step('test', './node_modules/.bin/ember test'),
util.yarnPublish(isPr=true),
],
runsOn=['ubuntu-latest'], // it's public fork. don't use private runners for public fork
);
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,39 +27,6 @@
"uses": "browser-actions/setup-chrome@latest"
- "name": "test"
"run": "./node_modules/.bin/ember test"
- "env":
"PR_NUMBER": "${{ github.event.number }}"
"name": "publish"
"run": |
bash -c 'set -xeo pipefail;
cp package.json package.json.bak;
VERSION=$(yarn version --non-interactive 2>/dev/null | grep "Current version" | grep -o -P '[0-9a-zA-Z_.-]+$' );
if [[ ! -z "${PR_NUMBER}" ]]; then
echo "Setting tag/version for pr build.";
TAG=pr-$PR_NUMBER;
PUBLISHVERSION="$VERSION-pr$PR_NUMBER.$GITHUB_RUN_NUMBER";
elif [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
if [[ "${GITHUB_REF_NAME}" != "${VERSION}" ]]; then
echo "Tag version does not match package version. They should match. Exiting";
exit 1;
fi
echo "Setting tag/version for release/tag build.";
PUBLISHVERSION=$VERSION;
TAG="latest";
elif [[ "${GITHUB_REF_TYPE}" == "branch" && "${GITHUB_REF_NAME}" == "main" ]]; then
echo "Setting tag/version for release/tag build.";
PUBLISHVERSION=$VERSION;
TAG="latest";
else
exit 1
fi
yarn publish --non-interactive --no-git-tag-version --tag "$TAG" --new-version "$PUBLISHVERSION";
mv package.json.bak package.json;
';
"timeout-minutes": 30
"yarn-publish-preview":
"container":
Expand Down

0 comments on commit 8619658

Please sign in to comment.