Skip to content

Commit

Permalink
Merge pull request #314 from IBMa/workflow-test
Browse files Browse the repository at this point in the history
Fix extension publish workflow
  • Loading branch information
tombrunet authored Feb 11, 2021
2 parents 394446c + d864d5b commit deb1c29
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 19 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Set env
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF:10}
- run: npm install
working-directory: accessibility-checker
- run: npm run build
Expand All @@ -48,8 +46,6 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Set env
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF:10}
- run: npm install
working-directory: karma-accessibility-checker
- run: npm run build
Expand All @@ -71,8 +67,6 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Set env
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF:10}
- run: npm install
working-directory: cypress-accessibility-checker
- run: npm run build:report
Expand All @@ -96,21 +90,19 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Set env
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF:10}
- run: npm install
working-directory: report-react
- run: npm install
working-directory: accessibility-checker-extension
- run: cp -f ./manifest_Chrome.json ./src/manifest.json
working-directory: accessibility-checker-extension
- run: |
if [ -n "$RELEASE_VERSION" ]; then
sed -i'.old' -e 's/"version": "3.0.0"/"version": "'"$RELEASE_VERSION"'"/g' ./manifest.json
if [[ -n "${GITHUB_REF:10}" ]]; then
RELEASE_VERSION=${GITHUB_REF#refs/*/} && sed -i'.old' -e 's/"version": "3.0.0"/"version": "'"${RELEASE_VERSION}"'"/g' ./manifest.json
fi;
working-directory: accessibility-checker-extension/src
- run: rm manifest.json.old
working-directory: accessibility-checker-extension/src
- run: cp -f ./manifest_Chrome.json ./src/manifest.json
working-directory: accessibility-checker-extension
- run: npm run package:browser
working-directory: accessibility-checker-extension
- name: Upload packed extension
Expand All @@ -120,6 +112,13 @@ jobs:
path: accessibility-checker-extension/package/accessibility-checker-extension.zip
- run: cp -f ./manifest_Firefox.json ./src/manifest.json
working-directory: accessibility-checker-extension
- run: |
if [[ -n "${GITHUB_REF:10}" ]]; then
RELEASE_VERSION=${GITHUB_REF#refs/*/} && sed -i'.old' -e 's/"version": "3.0.0"/"version": "'"${RELEASE_VERSION}"'"/g' ./manifest.json
fi;
working-directory: accessibility-checker-extension/src
- run: rm manifest.json.old
working-directory: accessibility-checker-extension/src
- run: npm run package:browser
working-directory: accessibility-checker-extension
- name: Upload packed extension
Expand Down
6 changes: 3 additions & 3 deletions gitactions/publish/achecker.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if [ -n "$RELEASE_VERSION" ]; then
if [ -n "${GITHUB_REF:10}" ]; then
cd ./accessibility-checker/src;
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >.npmrc;
echo "Deploy accessibility-checker version $RELEASE_VERSION...";
npm --no-git-tag-version version $RELEASE_VERSION;
echo "Deploy accessibility-checker version ${GITHUB_REF:10}...";
npm --no-git-tag-version version ${GITHUB_REF:10};
npm publish;
fi
2 changes: 1 addition & 1 deletion gitactions/publish/cypress-achecker.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if [ -n "$RELEASE_VERSION" ]; then
if [ -n "${GITHUB_REF:10}" ]; then
cd ./cypress-accessibility-checker/package;
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >.npmrc;
echo "Deploy cypress-accessibility-checker version $RELEASE_VERSION...";
Expand Down
6 changes: 3 additions & 3 deletions gitactions/publish/karma-achecker.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if [ -n "$RELEASE_VERSION" ]; then
if [ -n "${GITHUB_REF:10}" ]; then
cd ./karma-accessibility-checker/src;
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >.npmrc;
echo "Deploy karma-accessibility-checker version $RELEASE_VERSION...";
npm --no-git-tag-version version $RELEASE_VERSION;
echo "Deploy karma-accessibility-checker version ${GITHUB_REF:10}...";
npm --no-git-tag-version version ${GITHUB_REF:10};
npm publish;
fi

0 comments on commit deb1c29

Please sign in to comment.