Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
eromano committed Mar 26, 2022
1 parent be9ccaa commit 445a369
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/js-api-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
needs: test
name: release
runs-on: ubuntu-latest
if: github.head_ref == 'master' || github.head_ref == 'develop' || github.event.schedule == '0 3 * * *'
if: github.head_ref == 'refs/heads/master' || github.head_ref == 'refs/heads/develop' || github.event.schedule == '0 3 * * *'
steps:
- name: Checkout
uses: actions/[email protected]
Expand All @@ -97,14 +97,14 @@ jobs:
- run: npm ci

- name: Release
if: github.head_ref == 'master' || github.head_ref == 'develop'
if: github.head_ref == 'refs/heads/master' || github.head_ref == 'refs/heads/develop'
shell: bash
run: |
./scripts/build.sh || exit 1
./scripts/publish.sh
- name: Release Tag
if: github.head_ref == 'master'
if: github.head_ref == 'refs/heads/master'
shell: bash
run: |
./scripts/git-tag.sh
Expand All @@ -114,3 +114,8 @@ jobs:
if: github.event.schedule == '0 3 * * *'
run: ./scripts/update-project.sh -p ${{ github.run_number }} -t ${{ secrets.GITHUB_TOKEN }} -v alpha

- name: Trigger ADF master
shell: bash
if: github.head_ref == 'refs/heads/master'
run: ./scripts/update-project.sh -p ${{ github.run_number }} -t ${{ secrets.GITHUB_TOKEN }} -v latest

14 changes: 3 additions & 11 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,10 @@ rm -rf node_modules/@alfresco/js-api/

npm install @alfresco/adf-cli@alpha --no-save

if [[ $GITHUB_PULL_REQUEST == "false" ]];
if [[ $GITHUB_BRANCH == "refs/heads/develop" ]];
then
if [[ $GITHUB_BRANCH == "develop" ]];
then
NEXT_VERSION=-nextalpha

./scripts/update-version.sh -gnu $NEXT_VERSION || exit 1;
fi

else
./node_modules/@alfresco/adf-cli/bin/adf-cli update-version --alpha --pathPackage "$(pwd)"
fi;
./scripts/update-version.sh -gnu -nextalpha || exit 1;
fi

echo "====== Build ====="
npm run build
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cd $DIR/..

TAG_NPM=alpha

if [[ $GITHUB_BRANCH == "master" ]]; then
if [[ $GITHUB_BRANCH == "refs/heads/master" ]]; then
TAG_NPM=latest
fi

Expand Down

0 comments on commit 445a369

Please sign in to comment.